Python String lower() Method


Advertisements


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.

Live Demo
#!/usr/bin/python

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

When we run above program, it produces following result −

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

python_strings.htm

Advertisements