RUVIDEO
Поделитесь видео 🙏

Python Strip String Method

Check out our new Strip String Method tutorial at https://www.mastercode.online/courses/tutorial/strip-string-method/

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 - https://www.facebook.com/mastercodeonline/
Twitter - https://twitter.com/mastercodeonlin?lang=en
Website - http://mastercode.online
======================================

Python Strip String Method
In this Python tutorial, we're going to focus on the Python strip string method. Python strip string method has the capability to strip content from the left or right side of the string object. Strip string method takes one argument the argument must be in a string format and if this argument is blank then it will move the white space from either left or right or both sides of the string object. The strip string method removes content from the left and right hand side of the string object where the left strip string method removes content from the left-hand side and the right strip string method removes from the right-hand side of a string object.

Python Strip String Method Syntax
'String Object'.strip('chars')

'String Object' - This is our string object which were going to call the python strip string method on.
.strip() - The strip string method removes content from the left and right side of the string object. When the strip string method comes across the character that does not match the argument the strip string method will stop.
'Chars' - This argument is case-sensitive and does not have to be in any particular order. Python will take the argument and remove any characters that matched the string object and remove those characters and return a new string object.
Example Of The Python Strip String Method
#Example 1
' This is a string '.strip()
'This is a string'

#Example 2
'This is a string in Python'.strip('nThiosn')
' is a string in Pyt'

#Example 3
'http://learnpythontutorial.com'.strip('htp://')
'learnpythontutorial.com'
Examples Explained

Example 1:

' This is a string '.strip() - In this example we create a string object and we called the strip string method on our string object. We provide no argument so the strip string method will remove only white space.

'This is a string' - We are return a string object says no whitespace on either the left or right inside.

Example 2:

'This is a string in Python'.strip('nThiosn') - In this example we create a new string object and we call the strip string method on our string object. We provide an argument that contains some characters that would like to move from the left and right hand side of the string object.

' is a string in Pyt' - We are returned a string object with some characters made from the left and right side of the string object.

Example 3:

'http://learnpythontutorial.com'.strip('htp://') - in this example we create string object and we give an argument to remove HTTP:// from our string object.

'learnpythontutorial.com' - We are returned a new string object that removes the 'http://' from the string object.

Conclusion

In this Python tutorial we look at the Python strip string method. If you have any questions please leave a comment below.

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Python Strip String Method», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.