Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

how do I use the "upper()" command in python?

+2 votes
asked May 2, 2023 by Jericho (180 points)
how do I use the "upper()" command in python?

not only that, but how do I use the "lower()" command in python?

1 Answer

0 votes
answered Jun 11, 2023 by Kokoz (340 points)
Examples:
string = "abcDeFGhijKLMNopqrstuvwXyZ"

upper_string = string.upper()

lower_string = string.lower()

print(string) ---> "abcDeFGhijKLMNopqrstuvwXyZ"
print(upper_string) ---> "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
print(lower_string) ---> "abcdefghijklmnopqrstuvwxyz"

The "upper()" method makes all lowercase characters in "string" variable to uppercase.
And the "lower()" method makes all uppercase characters in "string" variable to lowercase.

That's pretty much it.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...