?
What will be the output of the following code:
What will be the output of the following code:
my_string = "Hello, World!"
print(my_string.lower())
print(my_string.lower())
Answer & Solution
Correct Answer:
Option
A
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!".
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!".
Join the Discussion
Login to post a comment or share your explanation.
Login