Learnerslesson
   JAVA   
  SPRING  
  SPRINGBOOT  
 HIBERNATE 
  HADOOP  
   HIVE   
   ALGORITHMS   
   PYTHON   
   GO   
   KOTLIN   
   C#   
   RUBY   
   C++   




islower( ) FUNCTION


islower( ) Function


The islower( ) Function is used to check if all the letters in the String are of lower case.


Example :


x = "Hello World"
if x.islower():
    print("All the letters of the String are in lower case")
else:
    print("Not all the letters of the String are in lower case")


Output :



  Not all the letters of the String are in lower case

In the above code, we have declared a String 'Hello World'.


x = "Hello World"

java_Collections

So, to check, if all the letters in the String are of lower case, we have used 'islower( )' function.


if x.islower():
    print("All the letters of the String are in lower case")
else:
    print("Not all the letters of the String are in lower case")

And in this case, 'H' and 'W' in the String 'Hello World' is in upper case. So, we got the below output.


Not all the letters of the String are in lower case

Similarly, let us look at the next example.


Example :


x = "hello world"
if x.islower():
    print("All the letters of the String are in lower case")
else:
    print("Not all the letters of the String are in lower case")


Output :



  All the letters of the String are in lower case

In the above code, we have declared a String 'hello world'.


x = "hello world"

java_Collections

Similarly, to check, if all the letters in the String are of lower case, we have used 'islower( )' function.


if x.islower():
    print("All the letters of the String are in lower case")
else:
    print("Not all the letters of the String are in lower case")

And in this case, all the letters in the String 'hello world' are in lower case. So, we got the below output.


All the letters of the String are in lower case