I need to read a file containing information on different lines - for example the file may contain
12345678910
abcdefghij
zyxwvutsrq
I will then need to read the code vertically, so my list would be:
(1az)(2by)
The code I have so far is
# grid is the original file that has been read and put into a list
grid2 = zip(*grid)
for word in words :
for charc in grid2 :
if word in charc :
wordsFound.append(word )
I then run then the zip(*grid)
through my search function but it just returns the entire words file and not just the words it has found
Any help will be appreciated, thank you.