Python String islower() Method

By Lenin Mishra

If you prefer to watch Youtube videos over reading blogs, check out our video on Python strings here.

Python String islower() method

The islower() method in Python returns True, if all characters are lowercase.

It doesn’t take numbers, symbols and spaces into account.

Syntax of islower() method

Returns True or False


# all lowercase alphabets
s = "pylenin"
>>> True

# lowercase alphabets with numbers
s = "pylenin1992"
>>> True

# lowercase alphabets with spaces
s = "pylenin loves python"
>>> True

# lowercase alphabets with special symbols
s = ""
>>> True

# string containing uppercase characters
s = "Pylenin loves python"
>>> False

The islower() method in Python doesn’t make changes to the original string. It actually returns a new string.

You can confirm this by using the id() function in Python. It is a built-in function in Python that returns the unique identity of an object.


s1 = "pylenin"
s2 = "pylenin"

print(id(s1) == id(s2))
>>> True

print(id(s1) == id(s1.islower()))
>>> False

print(id(s2) == id(s2.islower()))
>>> False

Check out other commonly used Python string methods.

  1. How to create a string in Python?
  2. How to access characters in a Python string?
  3. How to replace characters in a string in Python?
  4. How to concatenate strings in Python?
  5. How to iterate through a string in Python?
  6. Check if a Substring is Present in a Given String in Python
  7. Escape sequences in Python String
  8. Python String Formatting - The Definitive Guide