Python String isupper() Method

❮ String Methods


Example

Check if all the characters in the text are in upper case:

txt = "THIS IS NOW!"

x = txt.isupper()

print(x)
Try it Yourself »

Definition and Usage

The isupper() method returns True if all the characters are in upper case, otherwise False.

Numbers, symbols and spaces are not checked, only alphabet characters.


Syntax

string.isupper()

Parameter Values

No parameters.


More Examples

Example

Check if all the characters in the texts are in upper case:

a = "Hello World!"
b = "hello 123"
c = "MY NAME IS PETER"

print(a.isupper())
print(b.isupper())
print(c.isupper())
Try it Yourself »

❮ String Methods

Copyright 1999-2023 by Refsnes Data. All Rights Reserved.