Python isupper() method
Description
The Python isupper() method checks whether all letters in a string are uppercase.
Syntax
Syntax of the isupper() method:
str.isupper()
Parameters
- none.
Return Value
Returns True if the string contains at least one cased character and all such cased characters are uppercase, otherwise False
Example
The following example shows how to use the isupper() method:
Example
#!/usr/bin/python
str
=
"THIS IS STRING EXAMPLE....WOW!!!"
;
(
str
.
isupper
(
)
)
;
str
=
"THIS is string example....wow!!!"
;
(
str
.
isupper
(
)
)
;
The output of the above example is:
True
False
Python Strings