Oct-03-2019, 02:06 PM
def find_treasure(mapfile): with open(mapfile,'r')as column: for i, row in enumerate(column): for j, val in enumerate(row): if val == 'T': print(i,j)I can only manage to find all the coordinates for T, i dk how to set a condition such that it returns only the treasure coordinate when it is surrounded by T's