Possible Duplicate:
How to search nested list grid and give lettered coordinates in Python?
I currently have this nested list acting as a 6×6 grid:
grid = [["Z","9","G","Q","T","3"],
["Y","8","F","P","S","2"],
["X","7","E","O","R","1"],
["W","6","D","N","M","0"],
["V","5","C","L","K","U"],
["J","4","B","I","H","A"]]
The rows and columns are referred to as A,B,C,D,E,F rather than the usual 0,1,2,3,4,5. Therefore the letters need to be converted to numbers and then the item has to be found in the nested list.
For example if the user typed in: FE CC ED ED CD
This should locate the letters for HELLO and print out the word HELLO as this was the encrypted message.
Any help on how I manage this would be greatly appreciated.
1 Answer