Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Python3 upper() Method

Python3 upper() Method

Python3 Strings Python3 Strings


Description

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

Syntax

Syntax of the upper() method:


str.upper()

Parameters

Return Value

Returns the string with lowercase letters converted to uppercase.

Example

The following example shows how to use the upper() function:


#!/usr/bin/python3

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

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

The output of the above example is:


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

Python3 Strings Python3 Strings