Advertisement
# Signature of isupper() method
isupper()
# Python - Method isupper() Example
# Creating a string
s1 = ('I Love Minions')
# Printing the original string
print('Value of string : ', s1)
# Calling the upper() method on string object
print('Calling the isupper() method on string : ', s1.upper())
Value of string : I Love Minions
Calling the upper() method on string : False
Advertisement
# Python - Method isupper() Example
# Calling isupper() method on a string of all upper case characters
print('NEVER GIVE UP'.isupper())
# Calling isupper() method on a string of only digits
print('123'.isupper())
# Calling isupper() method on a string of digits and upper case characters
print('123.. GO!'.isupper())
# Calling isupper() method on a string of all upper case characters except one lowercase letter
print('KEEP SMILInG!'.isupper())
# Calling isupper() method on a string
print('#1. SUN(HEART OF OUR SOLAR SYSTEM)'.isupper())
True
False
True
False
True
Advertisement
Advertisement
Please check our latest addition
C#, PYTHON and DJANGO
Advertisement