Find Letter of Words in a Matrix Diagonally
问题 I have a 5*6 matrix, all of the values are the English alphabets. I have to find specific words in the matrix in left to right, right to left, up down, down up and diagonally. It's a word puzzle actually. I can find the words left right, right left, up down and down up. When it comes to finding the words diagonally things get messier. I have provided the sample code for the left to right and right to left search. #the word I am looking for word_list = ["CRAM", "ROTLQ", "TDML", "COOI"] #