I have a list that is somewhat random.
list = [1,2,4,2,25,3,2,4,2,1,1,32,3,3,2,2,23,4,2,2,2,34,234,33,2,4,3,2,3,4,2,1,3,4,3]
I want to iterate through it and do something like this:
for item in list:
while item >=5:
if item = item_5_indexes_ago
print "its the same as it was 5 entries ago!"
Obviously, item_5_indexes_ago is not valid python. What should I substitute here? I want to check if list[5]==list[1], if list[6]==list[2], ..... for every item in the list.