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
for x in d.keys()[:-1]: print x if d: print "last item:", d.keys()[-1]