Hi guys, I wonder if any of you can help me with my problem....
I am trying to write a script that searches a file that describes a grid of letters, like:
wergfdghytr bhgiusuwiee popeldorlfse funwrdtywa
The script uses another file for a word list, where each line contains a word. Both of these files are passed as arguments to the script as well as the length of the words to search for, like:
python word_search.py grid.txt words.txt 5 The words can be in any direction, and can change direction, the only rule is that the next letter must be next to(above, diagonally above, left, etc, etc) the current letter.
I can not tell you how many times I have attempted this script and started again out of frustration :/ lol.
Any help or ideas on how to go about this would be greatly appreciated.