Python Programming - Tricky Questions - Discussion

Discussion Forum : Tricky Questions - General Questions (Q.No. 32)
32.
What will be the output of the following Python code?
x = "Python"
y = x.lower()
z = x.upper()
result = y + z
print(result)
"PythonPYTHON"
"pythonPYTHON"
"pythonPYTHONpython"
This code will result in an error.
Answer: Option
Explanation:
The lower() method makes the string lowercase, and upper() makes it uppercase.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.