Python upper() Method
Description
The Python upper() method converts lowercase letters in a string to uppercase letters.
Syntax
The syntax of the upper() method is:
str.upper()
Parameters
- NA。
Return Value
Returns a string with lowercase letters converted to uppercase letters.
Examples
The following example demonstrates the usage of the upper() function:
#!/usr/bin/python str = "this is string example....wow!!!"; print "str.upper() : ", str.upper()
The output of the above example is:
str.upper() : THIS IS STRING EXAMPLE....WOW!!!
Other Extensions
Python String