Description
The Python upper() method converts lowercase letters in a string to uppercase letters.
Syntax
upper() method syntax:
str.upper()
Parameters
NA.
Return value
Returns a string of lowercase letters converted to uppercase letters.
Examples
The following examples show how to use upper()function:
#!/usr/bin/python str = "this is string example....wow!!!"; print "str.upper() : ", str.upper()
The output results of the above examples are as follows:
str.upper() : THIS IS STRING EXAMPLE....WOW!!!
【Related recommendations】
2. How to convert uppercase and lowercase in python
3. Detailed explanation of the use of lower and upper functions in python
The above is the detailed content of Introduction to python basics - upper. For more information, please follow other related articles on the PHP Chinese website!