Python-Quizzes | Python String Quiz | Question 10
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
Last Updated :
18 Sep, 2020
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...