When iterating through a dictionary, I want to skip an item if it has a particular key. I tried something like mydict.next()
, but I got an error message 'dict' object has no attribute 'next'
for key, value in mydict.iteritems():
if key == 'skipthis':
mydict.next()
# for others do some complicated process
I am using Python 2.7 if that matters.