Python 3 reference · String Methods
Python String isupper() Method
Return True if all cased characters are upper case and there is at least one cased character.
Python 3 Since 3.0
Syntax
str.isupper()
Return value
True or False.
Examples
print("NASA".isupper(), "NASA 2026".isupper(), "Nasa".isupper(), "2026".isupper())
Output
True True False False
words = "Read the FAQ before you ask the CEO".split()
print([w for w in words if w.isupper()])
Output
['FAQ', 'CEO']
Version history
| Version | Change |
|---|---|
| Python 3.0 | Added |
Related
str.islower()· Return True if all cased characters are lower case and there is at least one cased character.str.upper()· Return a copy of the string with all cased characters converted to upper case.str.istitle()· Return True if the string is title-cased: each word starts with an upper-case letter followed by lower-case letters.- Python Strings · tutorial