I know theres probably a library or something for this but I need it preferably done this way, what I need is to check every word in a json file structured like this:
{
"a": 1,
"aa": 1,
"aaa": 1,
"aah": 1,
"aahed": 1,
"aahing": 1,
"aahs": 1,
"aal": 1,
"aalii": 1,
"aaliis": 1,
"aals": 1,
"aam": 1,...
for a scrabble game where it will find the best word using the letters from variable 'word' and find the most point worthy word in that json file by calculating each of its points from a dictionary like this:
{
"a": 1,
"b": 2,
"c": 2,
"d": 3,
"e": 1,...
^ the letters and their scrabble "points"
I wouldve done something like threading and for looping but for 370,000 words its not that efficient
I can also change seperately change the values of the words to be the points instead of 1's if that would speed up the check process
Doing it using the normal for loop just crashed the program since its 370k words