Skip to content
Related Articles
Open in App
Not now

Related Articles

Python-Quizzes | Python String Quiz | Question 10

Improve Article
Save Article
  • Last Updated : 18 Sep, 2020
Improve Article
Save Article

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

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!