Islower() Method Of Str Class

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:

#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:

String has all lower case letters:False

String has all lower case letters:True

 

 


Copyright 2019 © pythontic.com