String Methods
str.isupper()
Require at least one cased character and uppercase status for every cased character. Digits, punctuation and uncased scripts are ignored for the case condition. Titlecase characters are distinct from uppercase, so an uppercase-looking digraph can fail. Takes no arguments.
Formal Syntax & Structure
python syntaxpython
text.isupper()Return Value
bool
True when the stated classification holds; otherwise False.
Working Example
Example Snippetpython
for text in ("API-42", "Api", "سلام", "سلام A", ""): print(repr(text), text.isupper())