Python isupper is one of the Python String Method which is used to check whether the given string has at least one character, and the character is either in uppercase, or not. If it is in Uppercase then the function will return True otherwise, it returns False. In this article we will show you, How to write isupper Function in Python Programming with example.
isupper Syntax in Python
The basic syntax of the isupper in Python is as shown below:
- String_Value: Please select a valid String literal.
Python isupper example
The following set of examples will help you understand the Python string isupper function
# isupper in Python Example Str1 = 'TUTORIAL GATEWAY'; print('First Output of a isupper() method is = ', Str1.isupper()) # Performing isupper() function on Empty Space Str2 = ' '; print('Second Output of a isupper() For Empty Space is = ', Str2.isupper()) # Performing isupper() function directly on Alphabets Str3 = 'PYTHON LANGUAGE tutorial at Tutorial GatewaY'.isupper() print('Third Output of a isupper() method is = ', Str3) # Performing isupper() on both Digits and Alphabets Str4 = '139ABCD'.isupper() print('Fourth Output of a isupper() method is = ', Str4) # Performing isupper() on Special Characters Str5 = '[email protected]@@'.isupper() print('Fifth Output of a islower() method is = ', Str5) # Usuing isupper() on Both Alphabets & Special Characters Str6 = '[email protected]@@'.isupper() print('Sixth Output of a isupper() method is = ', Str6)
Thank you for Visiting Our Blog