What does upper mean in python? Here we will introduce you to upper().
Python upper() method converts lowercase letters in a string to uppercase letters.
upper() method syntax:
str.upper()
Parameters
NA.
Return value
Returns a string of lowercase letters converted to uppercase letters.
Related recommendations: "python video tutorial"
Example
The following example shows how to use the 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!!!
Summary
The opposite of upper() is the lower() method, which can convert strings into Convert uppercase letters to lowercase letters and use the same method.
The above is the detailed content of What does upper mean in python?. For more information, please follow other related articles on the PHP Chinese website!