Python Isupper String Method

Veröffentlicht am: 29 September 2015
auf dem Kanal: Code master
3,965
42

Be sure to like, share and comment to show your support for our tutorials.

=======================================
Channel - https://goo.gl/pnKLqE
Playlist For This Tutorial - https://goo.gl/EyZFti
Latest Video - https://goo.gl/atWRkF
Facebook -   / mastercodeonline  
Twitter - https://twitter.com/mastercodeonlin?l...
Website - http://mastercode.online
======================================
Python Isupper String Method
In this Python tutorial we will take a look at the Python isupper string method. The isupper string method checks a string object to see if it contains all uppercase characters and if the string object contains all uppercase characters Python will return True if not then Python returns False.

Python Isupper String Method Syntax
'String Object'.isupper()

'String Object' - Our string object which will be checked by the isupper string method.
.isupper() - The isupper string method will check our string object to see if all characters are uppercase if they are then Python returns True and if they are not then Python returns False.
Python Isupper String Method Examples
#Example 1
'IS'.isupper()
True

#Example 2
'Is'.isupper()
False

#Example 3
'is not upper'.isupper()
False

#Example 4
'IS UPPER'.isupper()
True
Examples Explained

Example 1:

'IS'.isupper() - We create a string object with all uppercase letters and then we call our isupper string method on our string object.

True - We are returned a True since all of our characters are uppercase.
Example 2:

'Is'.isupper() - We create a string object with an uppercase and lowercase letter then we call our isupper string method on our string object.

False - We are returned False since our sting contains an upper and lowercase letter.
Example 3:

'is not upper'.isupper() - We create a string object with all lowercase letters and then we call our isupper string method on our string object.

False - We are returned False since all of our characters are lowercase.
Example 4:

IS UPPER'.isupper() - We create a string object that contains all uppercase letters and call our isupper string method on our string object.

True - We are returned True since our string object contains all uppercase letters.
Conclusion

In this Python tutorial we looked at the Python isupper string method. This string method returns True if all letters in the string are uppercase and False if the string contains one or more lowercase letters. If you have any questions about the isupper string method leave a comment below.


Auf dieser Seite können Sie das Online-Video Python Isupper String Method mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Code master 29 September 2015 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 3,965 Mal angesehen und es wurde von 42 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!