Python String isupper() Method
The isupper() method detects whether all letters in a string are uppercase.
Python String isupper() Syntax
isupper() method syntax.
str.isupper()
Python String isupper() Parameters
- None.
Python String isupper() Return Value
Returns True if the string contains at least one case-sensitive character and all those (case-sensitive) characters are uppercase, otherwise returns False.
Python String isupper() Example#1
The following example shows an instance of the isupper() method.
#!/usr/bin/python3
isupp_str = "APIDEMOS"
not_isupp = "Apidemos"
# Checking which string is completely uppercase
print ("Is APIDEMOS full uppercase ? : " + str(isupp_str.isupper()))
print ("Is Apidemos full uppercase ? : " + str(not_isupp.isupper()))
Output: