Easy Tutorial
❮ Python File Truncate Python Mongodb ❯

Python3 upper() Method

Python3 Strings


Description

The Python upper() method converts all lowercase letters in a string to uppercase.

Syntax

The syntax for the upper() method is:

str.upper()

Parameters

Return Value

Returns a string where all lowercase letters are converted to uppercase.

Example

The following example demonstrates the use of the upper() function:

#!/usr/bin/python3

str = "this is string example from tutorialpro....wow!!!";

print ("str.upper() : ", str.upper())

The output of the above example is:

str.upper() :  THIS IS STRING EXAMPLE FROM tutorialpro....WOW!!!

Python3 Strings

❮ Python File Truncate Python Mongodb ❯