Python String upper() Method
Advertisements
Description
The method upper() returns a copy of the string in which all case-based characters have been uppercased.
Syntax
Following is the syntax for upper() method
str.upper()
Parameters
NA
Return Value
This method returns a copy of the string in which all case-based characters have been uppercased.
Example
The following example shows the usage of upper() method.
#!/usr/bin/python str = "this is string example....wow!!!"; print "str.capitalize() : ", str.capitalize()
Let us compile and run the above program, this will produce the following result:
THIS IS STRING EXAMPLE....WOW!!!