Python string method upper() returns a copy of the string in which all case-based characters have been uppercased.
Following is the syntax for upper() method −
str.upper()
NA
This method returns a copy of the string in which all case-based characters have been uppercased.
The following example shows the usage of upper() method.
#!/usr/bin/python str = "this is string example....wow!!!"; print "str.capitalize() : ", str.upper()
When we run above program, it produces following result −
str.capitalize() : THIS IS STRING EXAMPLE....WOW!!!