Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesUse Python’s str.isupper() method: text.isupper() returns True when the string contains at least one cased character and every cased character is uppercase. It returns False otherwise.
Check a Python string with isupper()
Call the method directly on the string you want to test:
text = "HELLO!"
print(text.isupper()) # True
This is a test of the original string, not a conversion. For Python 3.14.7, the official str.isupper() documentation defines the result by the string’s cased characters: they must all be uppercase, and there must be at least one.
How uncased characters affect the result
Spaces, punctuation, and digits are uncased characters. They do not make a string fail the test, but a string containing only uncased characters returns False because it has no cased character.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →#1 Best Overall
| Expression | Result | Why |
|---|---|---|
"HELLO".isupper() |
True |
All cased characters are uppercase. |
"HELLO! 123".isupper() |
True |
The cased characters are uppercase; punctuation, spaces, and digits are uncased. |
"Hello".isupper() |
False |
It contains a lowercase cased character. |
"123".isupper() |
False |
It contains no cased characters. |
"".isupper() |
False |
The empty string contains no cased characters. |
Checking is different from converting
text.upper() returns a string with cased characters converted to uppercase; it does not directly answer whether the original string was uppercase. Use text.isupper() for that question. Python also documents that s.upper().isupper() can be false when the original string contains uncased characters or uppercasing produces a titlecase character. See the str.upper() documentation for the conversion behavior and caveat.
For str and bytes, the rules differ
Python str is Unicode text, so str.isupper() is not limited to ASCII letters. A bytes value has its own isupper() method: it returns true only if there is at least one uppercase ASCII alphabetic byte and no lowercase ASCII bytes. The bytes.isupper() documentation describes that separate rule; do not assume it has the same character scope as the Unicode string method.
Quick Recap
Best Value
Rank #2
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




