What will be the output of the following code:
my_string = "Hello, World!"
print(my_string.lower())
print(my_string.lower())
A. "hello, world!"
B. "Hello, World!"
C. "HELLO, WORLD!"
D. "hello"
Answer: Option A
Solution (By Examveda Team)
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!".

Join The Discussion