I am having trouble being able to print reference something from a list by using 2 variables.
currentRow=4
currentRowText="row"+str(currentRow)
currentCol=3
currentLocType=currentRowText[currentCol]
print(currentRow,">",currentRowText,">",currentCol,">",currentLocType)
This prints out
4 > row4 > 3 > 4
however the last variable should be 'city' as it should be getting the data from
row4=("grasslands", "forest", "forest", "city", "forest", "forest", "mountain")
Any help is appreciated.
Thanks in advance.