Python Lower String Method

Veröffentlicht am: 30 September 2015
auf dem Kanal: Code master
6,472
59

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 Lower String Method
In this Python tutorial we will look at the Python lower string method. The lower string method will take a string object and create a new one with all contents of the string object as lowercase characters. The lower string method takes no arguments.

Python Lower String Method Syntax
'String Object'.lower()

'String Object' - We create a string object
.lower() - The lower string method will make a characters in new string object lowercase.
Examples Of The Python Lower String Method
#Example 1

'This IS a String'.lower()
'this is a string'

#Example 2
'NEW STRING'.lower()
'new string'

#Example 3
a = 'ThIs My StRiNg'
a.lower()
'this my string'
Examples Explained

Example 1:

'This IS a String'.lower() - We create a new string object with some lowercase characters and some uppercase letters and then we call the lower string method on our object.

'this is a string' - We create a new string object that contains all lowercase characters.

Example 2:

'NEW STRING'.lower() - We create a new string object this time we use the caps lock button to do so. We then call our lower string method on our new string object.

'new string' - We are returned a lowercase string which in fact is a new string object.

Example 3:

a = 'ThIs My StRiNg' - We create a new string object and assign 'a' to represent the object as a variable.

a.lower() - We call our string via the variable and then call the lower string method on our string object.

'this my string' - We are returned a new string object that is all lowercase characters.

Conclusion

In this Python Tutorial we have taken a look at the Python lower string method which converts an existing string method into new string but also converts all the characters to lowercase. If you have any questions about the lower string method in Python leave a comment below.


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