🚀 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:

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

The issue here is that x = 123 is an integer, and integers are not iterable in Python. You cannot loop through an integer directly like you can with a string, list, or other iterable objects.

So, this will result in an Error.

The correct answer is:

(C) Error

Latest Updates