islower() method of str class

The islower() method returns true if all the characters present in a string are lower case letters. Returns false if at least one character is not lower case.

Str Updated 11 Mar 2017 1 min read

Method Name

islower

Method Signature

islower()

Method Overview

  • islower() method returns true only if all the characters in a string object are lower cased.
  • islower()returns false if at least one character of the string is not lower cased;
  • For an empty string object - islower()will return False.

Example

python
#islower() will return False, since the string object has white spaces and

#upper case letters

nameString      = "The Little Prince"

caseCheckResult = nameString.islower()

print("String has all lower case letters:{}".format(caseCheckResult))

nameString        = "incomprehensibilities"

caseCheckResult   = nameString.islower()

print("String has all lower case letters:{}".format(caseCheckResult))

Output

Output
String has all lower case letters:False

String has all lower case letters:True