Python‎ > ‎str‎ > ‎

str.isupper()


Definition
Return True if all cased characters in S are uppercase and there is at least one cased character in S, False otherwise.

Syntax
str.isupper() -> bool

Parameters
str=string

Examples
The method return as:
 >>> x="Python"
>>> x.isupper()
False
>>> x="Python"
>>> x="PYTHON LAKE"
>>> x.isupper()
True
>>> x="PYTHON Lake"
>>> x.isupper()
False
>>>

The return are following:
 >>> x="PYTHON LAKE".isupper()
>>> y="python lake".upper()
>>> x==y
False
>>> "PYTHON LAKE".isupper()==("python lake".upper())
False
>>> "PYTHON LAKE".isupper()
True
>>> "python lake".upper().__eq__("PYTHON LAKE")
True
>>> True.__eq__(True)
True
>>>

Comments