What will be the output of the following Python code?
>>> import collections
>>> a=collections.OrderedDict((str(x),x) for x in range(3))
>>> a
>>> import collections
>>> a=collections.OrderedDict((str(x),x) for x in range(3))
>>> a
A. {'2':2, '0':0, '1':1}
B. OrderedDict([('0', 0), ('1', 1), ('2', 2)])
C. An exception is thrown
D. ' '
Answer: Option B
Join The Discussion