Python 3 - String lower() Method


Description

The method lower() returns a copy of the string in which all case-based characters have been lowercased.

Syntax

Following is the syntax for lower() method −

str.lower()

Parameters

NA

Return Value

This method returns a copy of the string in which all case-based characters have been lowercased.

Example

The following example shows the usage of lower() method.

#!/usr/bin/python3

str = "THIS IS STRING EXAMPLE....WOW!!!"
print (str.lower())

Result

When we run above program, it produces the following result −

this is string example....wow!!!
python_strings.htm
Advertisements