I am in python and iterating through list of class objects, removing certain ones that don't fit certain parameters. When called the list.remove() function it removes the last index instead of the parsed one. The specific code as follows:
for k in tile_to_print:
x_thing = int(x_size / 2) + k.x - player_position[0]
if x_thing > x_size - 1:
tile_to_print.remove(k)
How would I change this to remove a parsed object instead of the last.