Basically I would like to be able to tell when I\'m on the Nth item in a loop iteration. Any thoughts?
d = {1:2, 3:4, 5:6, 7:8, 9:0} for x in d: if last
list = [1,2,3] last = list[-1] for i in list: if i == last: print("Last:") print i
Output:
1 2 Last: 3