def setup_inp(inp):
    'Convert list of strings into list of lists, with glves/goblins replaced by tuples'
    grid = []
    for (rowI, row) in enumerate(inp.split('\n')):
        grid.append([x for x in row])
        for (colI, col) in enumerate(row):
            if (col in ['G', 'E']):
                char_tup = (col, 200, False)
                grid[rowI][colI] = char_tup
    return grid
Convert list of strings into list of lists, with glves/goblins replaced by tuples
def setup_inp(inp):
    
    grid = []
    for (rowI, row) in enumerate(inp.split('\n')):
        grid.append([x for x in row])
        for (colI, col) in enumerate(row):
            if (col in ['G', 'E']):
                char_tup = (col, 200, False)
                grid[rowI][colI] = char_tup
    return grid