I ran into a little problem. Let's say I have two lists:
list_A = ['0','1','2'] list_B = ['2','0','1']
Then I have a list of lists:
matrix = [ ['56','23','4'], ['45','5','67'], ['1','52','22'] ]
Then I need to iterate through list_A and list_B and use them effectively as codes. For example, I take the first number from the list of A and B, which will be "0" and "2", then I use them as coordinates: print matrix[0][2]
Then I need to do the same for the second number in lists A and B and the third number in lists A and B, etc., as if long lists A and B were not. How to do it in a loop?
python list
Steven
source share