94 of 151 menu

The islower method

The islower method checks whether all characters in a string are lowercase. Nothing is passed to the method parameters. The method returns the Boolean values ​​True or False.

Syntax

string.islower()

Example

Let's check if all characters in a string are lowercase:

txt = 'abcdef' print(txt.islower())

Result of code execution:

True

Example

Now let's say there are other symbols in the line:

txt = 'AbcDef' print(txt.islower())

Result of code execution:

False

See also

  • method istitle,
    which checks the first character of a word for uppercase
  • method isupper,
    which checks all characters in a string for uppercase
  • method capitalize,
    which changes the first character of a string to uppercase
  • method upper,
    which returns all characters of a string in uppercase
  • method lower,
    which returns all lowercase ASCII characters
  • method casefold,
    which returns all unicode characters in lowercase
  • method swapcase,
    which changes the case of characters to the opposite
  • method title,
    which changes the first character of each word to uppercase
byenru