I'm doing a robotic competition and I had a simple request.
This is a simplified analogue of what I have:
import random
dumping_list=[]
while True:
markers = [#a list that could range in length from many to no elements]
if len(markers) != 0:
#do some stuff
elif len(markers) == 0:
dumping_list.append(markers[0])
Now my question is, how can make the markers[0] in the elif refer to the markers[0] the last time that it contained something, how do I go about that?
Any help would be brilliant! Thanks