Learn To Solve It
Iterate over a dictionary
dict1 = {'a':1,'b':2,'c':3} sequence= dict1 it = iter(sequence) while True: try: value = next(it) except StopIteration: break print(value)
See also
Suggest a Code Improvement:design_iterator_ex2.py
Suggest a better explanation for design_iterator_ex2.rst
previous
Inheritance
next
Object Size