Python3 isupper() Method
Description
The isupper() method checks whether all letters in the string are uppercase.
Syntax
isupper() method syntax:
str.isupper()
Parameters
- None.
Return Value
If the string contains at least one case-sensitive character, and all these (case-sensitive) characters are uppercase, it returns True, otherwise it returns False.
Example
The following example demonstrates the usage of the isupper() method:
Example
#!/usr/bin/python3
str = "THIS IS STRING EXAMPLE....WOW!!!"
print (str.isupper())
str = "THIS is string example....wow!!!"
print (str.isupper())
str = "THIS IS STRING EXAMPLE....WOW!!!"
print (str.isupper())
str = "THIS is string example....wow!!!"
print (str.isupper())
The output of the above example is:
True False
Other Extensions
Python3 Strings