Question 10: What is the output of the following program?
x = 123
for i in x:
print (i, end = " " )
|
(A) 1 2 3
(B) 1 1 1
(C) Error
(D) No Output
Answer: (C)
Explanation: Objects of type int are not iterable instead a list, dictionary or a tuple should be used.
Quiz of this Question
Please comment below if you find anything wrong in the above post
Article Tags :
Recommended Articles