Python3 islower() Method |
\n\nDescription
\nThe islower() method checks whether all cased characters in the string are lowercase.
Syntax
\nSyntax for the islower() method:
str.islower()\n\n Parameters
\n- \n
- None. \n
Return Value
\nReturns True if all cased characters in the string are lowercase and there is at least one cased character, otherwise returns False.
Example
\nThe following examples demonstrate the use of the islower() method:
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:
\nFalse\nTrue\n\n \n\n
User Notes
\n\n
1. str.islower() checks if the string does not contain uppercase letters.
>>> 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
YouTip