Q26
What will be the output of the following code:my_string = "Hello, World!"print(my_string.lower())
A.
"hello, world!"
AnswerB.
"Hello, World!"
C.
"HELLO, WORLD!"
D.
"hello"
Answer: Option A
Solution
Answer: Option A
Solution:
The correct answer is Option A: "hello, world!".The lower() function in Python is used to convert all characters in a string to lowercase. When you call lower() on the string "Hello, World!", it converts all uppercase letters to lowercase, resulting in the string "hello, world!".