निम्नलिखित कोड का परिणाम क्या है स्निपेट?
What is the output of the following code snippet ?
print([i.lower() for i in “HELLO”])
A)
B)
C)
D)
Explanation:
Sure!
The code converts each character in "HELLO"
to lowercase using .lower()
, resulting in the list ['h', 'e', 'l', 'l', 'o']
.
Answer: (B) ['h', 'e', 'l', 'l', 'o'].