is there a way to extract a specific item from a list?

i do not have access to dictionaries right now, so i'd like to use a list to determine what sunflowers to harvest. (optmove is my movement algorithm)

current code:

import optmove

petals = []
petalsx = []
petalsy = []
while True:
  for i in range(get_world_size()):
    for i in range(get_world_size()):
      if get_ground_type() != Grounds.Soil:
        till()
      if get_entity_type() != Entities.Sunflower:
        harvest()
        plant(Entities.Sunflower)
        xx, yy = get_pos_x()+1, get_pos_y()+1
        petals.append(measure())
        petalsx.append(xx)
        petalsy.append(yy)
        move(North)
      move(East)

Posted May 13, 2026, 6:34 PM UTC

13
Loading comments…