Introduction to using the islower () method to process strings in Python
This article describes how to use the islower () method to process strings in Python. It is the basic knowledge for getting started with Python. For more information, see
The islower () method checks whether all characters (letters) of a string are in lowercase.
Syntax
The syntax of the islower () method is as follows:
?
Parameters
NA
Return Value
If all characters in a string are lowercase and contain at least one character, true is returned. Otherwise, false is returned.
Example
The following example shows how to use the islower () method.
?
1 2 3 4 5 6 7 |
#! /Usr/bin/python Str = "THIS is string example... wow !!! "; Print str. islower (); Str = "this is string example... wow !!! "; Print str. islower (); |
When we run the above program, it will produce the following results:
?