🚀 Hurry! Offer Ends In
00 Days
00 Hours
00 Mins
00 Secs
Enroll Now
X

निम्नलिखित का आउटपुट क्या है?

What is the output of the following ?

x=123 
for i in x: 
   print(i) 

A)
B)
C)
D)

Explanation:

The code you've provided is:

x = 123 
for i in x: 
   print(i)

The error occurs because x is an integer, and integers are not iterable in Python. Python allows iteration over sequences like lists, strings, and tuples, but not directly over integers.

Thus, trying to loop over an integer like this will raise a TypeError.

Correct answer: (C) Error.

Latest Updates