Advertisements
Advertisements
Question
Consider the statements given below and then choose the correct output from the given options:
D={'S01':95, 'S02':96}
for I in D :
print(I,end='#')Options
S01#S02#95#96#S01,95#S02,96#S01#95#SO2#96#
MCQ
Advertisements
Solution
S01#S02#
Explanation:
The loop for I in D iterates over the keys of the dictionary (same as D.keys()). Hence, each key of the dictionary is printed one by one, followed by # as specified by the end parameter.
shaalaa.com
Is there an error in this question or solution?
