Python String isupper() Method
Example
Check if all characters in the text are uppercase:
txt = "THIS IS NOW!" x = txt.isupper() print(x)
Definition and Usage
If all characters are uppercase, the isupper() method returns True, otherwise it returns False.
Does not check numbers, symbols, and spaces, only checks letter characters.
Syntax
string.isupper()
Parameter Value
No parameters.
More Examples
Example
Check if all characters in the text are uppercase:
a = "Hello World!" b = "hello 123" c = "MY NAME IS BILL" print(a.isupper()) print(b.isupper()) print(c.isupper())