निम्नलिखित पायथन कोड का आउटपुट क्या होगा ?
What will be the output of the following Python code ?
x = ‘abcd’
for i in x:
print(i.upper()) A
a B C D
B
a b c d
C
error
D
A B C D
Explanation
The code iterates through each character in the string 'abcd', and for each character, it prints the uppercase version using .upper(). So it will print:
A
B
C
D
Answer: (D) A B C D.
Correct Answer: D) A B C D