my_str='Welcome to plus2net Python section'
output=my_str.upper()
print(output)
Output
WELCOME TO PLUS2NET PYTHON SECTION
my_str = ''
output = my_str.upper()
print(output) # Output: ''
Output:
''
my_str = 'Welcome to Plus2Net! @2023'
output = my_str.upper()
print(output) # Output: 'WELCOME TO PLUS2NET! @2023'
Output:
WELCOME TO PLUS2NET! @2023
user_input = input("Enter your name: ")
print(user_input.upper())
Output:
If input is 'john', output: 'JOHN'
All String methods lower() islower() isupper()
Author & Instructor at plus2net
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery, and web development at plus2net. The tutorials focus on clear explanations, working examples, and code that readers can test and adapt while learning.