Python has many helper functions in its libraries that always help us with some day to day tasks. Let’s see how the string
isupper () method works which actually checks if all characters in the string are uppercase.
Syntax: string .isupper ()
Returns: True if all the letters in the string are in upper case and False if even one of them is in lower case.
Code # 1: Demonstration of isupper ()
Is GEEKSFORGEEKS full uppercase?: True Is Geeksforgeeks full uppercase?: False
Practical Use: This function can be used in many ways and has many practical uses. such applications to check uppercase, check abbreviations (usually uppercase), validate a sentence that requires all uppercases. Below is a small example demonstrating the isupper () method.
Code # 2 : Demonstration of isupper ()
Number of abbreviations in thi s sentence is: 3