Python .islower()

BalaPriyaC's avatar
Published Dec 22, 2021
Contribute to Docs

The .islower() string method takes in a string and returns True if all the letters in the string are in lowercase, else returns False. This method ignores spaces, newlines, numeric, and special characters in the string.

  • Learn to analyze and visualize data using Python and statistics.
    • Includes 8 Courses
    • With Certificate
    • Intermediate.
      13 hours
  • Learn the basics of Python 3.12, one of the most powerful, versatile, and in-demand programming languages today.
    • With Certificate
    • Beginner Friendly.
      24 hours

Syntax

string.islower()

Example

Use .islower() to check if a string contains only lowercase letters:

my_string = "code more!"
print(my_string.islower())
# Output: True

Codebyte Example

Use .islower() to check if my_string contains only lowercase letters, ignoring the dashes, exclamation point, and newline:

Code
Output
Loading...

All contributors

Contribute to Docs

Learn Python on Codecademy

  • Learn to analyze and visualize data using Python and statistics.
    • Includes 8 Courses
    • With Certificate
    • Intermediate.
      13 hours
  • Learn the basics of Python 3.12, one of the most powerful, versatile, and in-demand programming languages today.
    • With Certificate
    • Beginner Friendly.
      24 hours