I'm learning about dictionaries and I wrote a small bit of code and built it.
from collections import OrderedDict
d1 = OrderedDict([('a',0),('b',9),('c',8),('d',7),('e',6)])
d2 = OrderedDict([(1),(2),(3),(4),(5)])
I get the following error:
d2 = OrderedDict([(1),(2),(3),(4),(5)])
TypeError: 'int' object is not iterable
I don't understand why it isn't iterable? And what has 'int'
got to do with the problem?
Thanks