YouTip LogoYouTip

Python3 String Islower

Python3 islower() Method |

\n\n

Description

\n

The islower() method checks whether all cased characters in the string are lowercase.

\n\n

Syntax

\n

Syntax for the islower() method:

\n
str.islower()
\n\n

Parameters

\n
    \n
  • None.
  • \n
\n\n

Return Value

\n

Returns True if all cased characters in the string are lowercase and there is at least one cased character, otherwise returns False.

\n\n

Example

\n

The following examples demonstrate the use of the islower() method:

\n\n

Example

\n
#!/usr/bin/python3\n\nstr = " example....wow!!!"\n\nprint(str.islower())\n\nstr = " example....wow!!!"\n\nprint(str.islower())
\n\n

The output of the above example is:

\n
False\nTrue
\n\n
\n\n

User Notes

\n
\n

1. str.islower() checks if the string does not contain uppercase letters.

\n
>>> import sys; sys.version\n'3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 23:03:10) [MSC v.1916 64 bit (AMD64)]'\n>>> 'aaab32'.islower()\nTrue\n>>> 'aaab32Hello'.islower()\nTrue\n>>> 'aaab'.islower()\nTrue\n>>> 'aaab32~'.islower()\nTrue\n>>> 'aaab32~+'.islower()\nTrue\n>>> 'aaab32~?'.islower()\nTrue\n>>> 'aaab32...'.islower()\nTrue\n>>> 'anb'.islower()\nTrue\n>>> r'b'.islower()\nTrue\n>>> 'aaB'.islower()\nFalse\n>>> 'b'.islower()\nFalse
\n

Posted by vipkwd 6 years ago (2020-09-03)

\n
← Git AddGit Init β†’