Python Isupper String Method

Publicado em: 29 Setembro 2015
no canal de: 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.


Nesta página do site você pode assistir ao vídeo on-line Python Isupper String Method duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Code master 29 Setembro 2015, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 3,965 vezes e gostou 42 espectadores. Boa visualização!