Python Islower String Method

Veröffentlicht am: 29 September 2015
auf dem Kanal: Code master
2,475
32

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 Islower String Method
In this Python tutorial we will explore the Python islower string method. The islower string method checks the string object to ensure that all characters are lowercase characters. If the string object contains all lowercase characters Python will return True. If the string object contains an uppercase character or characters then Python will return False.

Python Islower String Method Syntax

'String Object'.islower()

'String Object' - This is our string object that will be examined by the islower string method.
.islower() - This is our string method islower() that checks if all characters in a string object are lowercase if they are then Python returns True and if the string object contains one or more uppercase characters than Python returns False.
Examples Of The Islower String Method
#Example 1
'islower string method'.islower()
True

#Example 2
'Islower string method'.islower()
False

#Example 3
a = 'this is a string'
a.islower()
True
Examples Explained

Example 1:

'islower string method'.islower() - We create a string object with all lowercase characters and call our islower string method on our string object.

True- We are returned True since our string object contains only lowercase characters.

Example 2:

'Islower string method'.islower() - We create another string object and this time we make the 'i' uppercase. Then we call our islower string method on the string object.

False- We are returned False since the string object contains a uppercase letter.

Example 3:

a = 'this is a string'- We create a new string object and assign the variable 'a' to represent the string object.

a.islower()- We then call our string object via the variable of 'a' and then we call the string method islower to check to see if all the characters in the string are lowercase.

True- We are returned True because all characters are lowercase in the string object.
Conclusion

In this Python tutorial we took a look at the Python islower string method which will check a string object and return True if the characters contained in the string are all lowercase if not then Python will return False.

If you have any questions about the islower string method leave a comment below and we will help you out.


Auf dieser Seite können Sie das Online-Video Python Islower 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 2,475 Mal angesehen und es wurde von 32 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!