Python3 upper() method
Description
Python upper() method converts lowercase letters in a string to uppercase letters.
Syntax
Syntax of the upper() method:
str.upper()
Parameters
- NA。
Return Value
Returns a string with lowercase letters converted to uppercase letters.
Example
The following example demonstrates how to use the upper() function:
#!/usr/bin/python3
str = "this is string example from example....wow!!!";
print ("str.upper() : ", str.upper())
The output of the above example is as follows:
str.upper() : THIS IS STRING EXAMPLE FROM EXAMPLE....WOW!!!
Other Extensions
Python3 Strings