Python 3.7: Lstrip String Method
In this Python 3.7 tutorial we will look at the lstrip string method in Python. For the full tutorial and code examples visit https://www.mastercode.online/courses/tutorial/lstrip-string-method/
Transcript:
Hello and welcome back to another Python tutorial my name is Tom with master code online as always don't forget to like share and subscribe to my channel and today tutorial we're going to go ahead and take a look at the lstrip string method or the left strip string method.
What the lstrip string method does try to say that 10 times fast it removes a set of characters from the left side of the string when did method meets a character does not recognize it stops looking for the set of characters are removed from the left side so just go ahead and take a look at it I'll show you.
What it does as a default if we pass no argument we're going to remove the white space from the left hand side of the string so we'll do egg.
The strip string method like this and no argument and will move remove the white space in the left side of the string. Now.
Razor saw this method often when I'm working with your routes are especially in a Django project to wear a user ads URL we want to go ahead and sanitize it so the way we do that is Tom I'll show you what's a is equal to a year Elmo say HTTP colon forward slash forward slash www master code. Online. Alright so now we what we want to do is we want to remove let's go ahead and remove the HTTP colon forward slash forward slash first we'll see how we do that so A. L strip. And I will inside a stream we're going to put a set of characters HTTP colon forward slash.
Now noticed that I put one tee but there's two I put 1/4 / but there's two it will remove any characters that match that until it hits a characters not in this set of characters down here. It's going to stop looking any further and return www. Massacre. Online they returned and there you go. Let's go and take a look at that real quick and tell strip like this HTTP colon. 4 / W. Close out that string close out that return and there you go if you guys have any questions head over to master code. Online and here's our URL right here let us know there. Otherwise we'll see next tutorial.
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Python 3.7: Lstrip String Method», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.