What will be the output of the following Python code?
>>> a={i: 'A' + str(i) for i in range(5)}
>>> a
>>> a={i: 'A' + str(i) for i in range(5)}
>>> a
A. An exception is thrown
B. {0: 'A0', 1: 'A1', 2: 'A2', 3: 'A3', 4: 'A4'}
C. {0: 'A', 1: 'A', 2: 'A', 3: 'A', 4: 'A'}
D. {0: '0', 1: '1', 2: '2', 3: '3', 4: '4'}
Answer: Option B
Join The Discussion