isupper() Function in Python – Check for uppercase

isupper() Function in python checks whether the string consists of uppercase only. lets see an example of python isupper() Function.

Syntax for isupper() Function in Python:

str.isupper()

Returns true if only upper cases are found else returns false.

 

Example of isupper() Function in python:

str1 = " 2018 IS AT DOORSTEP"; 
print str1.isupper()

str1="Beauty of DEMOCRACY"
print str1.isupper()

so the output will be

True
False

 

previous isupper() Function in python                                                                                                           next isupper() Function in python

Author

  • Sridhar Venkatachalam

    With close to 10 years on Experience in data science and machine learning Have extensively worked on programming languages like R, Python (Pandas), SAS, Pyspark.

    View all posts