Python lower() Method

Python 字符串Python String


Description

The Python lower() method converts all uppercase characters in a string to lowercase.

Syntax

Syntax of the lower() method:

str.lower()

Parameters

  • None.

Return Value

Returns a string with all uppercase characters in the string converted to lowercase.

Example

The following example demonstrates the usage of lower():

#!/usr/bin/python

str = "THIS IS STRING EXAMPLE....WOW!!!";

print str.lower();

The output of the above example is as follows:

this is string example....wow!!!

Python 字符串Python String

Other Extensions