python - Skipping to Next item in Dictionary -


when iterating through dictionary, want skip item if has particular key. tried mydict.next(), got error message 'dict' object has no attribute 'next'

for key, value in mydict.iteritems():     if key == 'skipthis':         mydict.next()     # others complicated process 

i using python 2.7 if matters.

use continue:

for key, value in mydict.iteritems():     if key == 'skipthis':         continue 

also see:


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -