How to Use String isupper() Method in PythonPython Basics


The isupper() method checks if all the string letters are uppercase.

Example

#!/usr/bin/python3
# -*- coding: UTF-8 -*-

str = "ABCDRFG"
print(str.isupper())

str = "aBCDEFG"
print(str.isupper())

Output:

True
False

Syntax

str.isupper()

Parameters

The method doesn’t take any parameters.

Return Value

It returns true or false.

© 2024 Learnwithgpt.org, all rights reserved. Privacy Policy | Contact Us