Python islower() Method

Python 字符串Python Strings


Description

The Python islower() method checks whether a string consists of lowercase letters.

Syntax

The islower() method syntax is:

str.islower()

Parameters

  • None.

Return Value

Returns True if the string contains at least one case-sensitive character, and all such (case-sensitive) characters are lowercase; otherwise, it returns False.

Examples

The following example demonstrates the islower() method:

#!/usr/bin/python

str = "THIS is string example....wow!!!"; 
print str.islower();

str = "this is string example....wow!!!";
print str.islower();

The output of the above example is as follows:

False
True

Python 字符串Python Strings

Other Extensions