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
d = {1:2, 3:4, 5:6, 7:8, 9:0} for i,x in enumerate(d): print "last item :"+repr(x) if i+1==len(d) else x
But the last item of an unordered dictionary doesn't mean anything