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

Basic useTry it yourself
print("NASA".isupper(), "NASA 2026".isupper(), "Nasa".isupper(), "2026".isupper())

Output

True True False False
Find acronymsTry it yourself
words = "Read the FAQ before you ask the CEO".split()
print([w for w in words if w.isupper()])

Output

['FAQ', 'CEO']

Version history

VersionChange
Python 3.0Added