isupper() string method in Python

The isupper() string method checks whether all cased characters in a string are uppercase.

Syntax

string.isupper()

Example:

Python

print('BANANA'.isupper())   # True
# All letters are uppercase

print('banana'.isupper())   # False
# All letters are lowercase

print('baNana'.isupper())   # False
# Mixed case, not all uppercase

print(' '.isupper())        # False
# No cased letters in the string

print('123!'.isupper())     # False
# No cased letters, only numbers and symbols

Special Notes