Python isupper Function is useful to check whether the given string has at least one character and whether the character is either in uppercase or not. If it is in Uppercase, then it returns true; otherwise, it returns False.
This section will discuss how to write an isupper Function in Python Programming with an example, and the syntax is
String_Value.isupper()
Python isupper function example
The following set of examples helps you understand it. Please refer to the String and its Methods articles in Python to understand them.
Str1 = 'TUTORIAL GATEWAY'; print('First Output of a method is = ', Str1.isupper()) # Performing on Empty Space Str2 = ' '; print('Second Output For Empty Space is = ', Str2.isupper()) # Performing directly on Alphabets Str3 = 'PYTHON LANGUAGE tutorial at Tutorial GatewaY'.isupper() print('Third Output is = ', Str3) # Performing both Digits and Alphabets Str4 = '139ABCD'.isupper() print('Fourth Output is = ', Str4) # Performing on Special Characters Str5 = '!!!@@@'.isupper() print('Fifth Output is = ', Str5) # Using on Both Alphabets & Special Characters Str6 = 'ABCDS!!!@@@'.isupper() print('Sixth Output is = ', Str6)