Python 3 Tutorial | Slicing Strings, Lists and Tuples

preview_player
Показать описание
How to Slice Strings, List and Tuples in Python 3. Slicing in python is a little trick select a Character or range from a string. Characters in a Strings, and Items in a List and Tuples have index positions starting from zero. You can slice an individual character in a string using the slice Operator - which is the square bracket [ ], then inside the bracket, you reference the index position of the string. Kindly watch to understand Slicing strings and list slicing in python 3.
To select a range of characters from a String, list or Tuples, you have to state the starting index and the ending index separated by a colon - like [2:7]. which means starting from index number 2 to index number 6 - excluding the upper index of the range.
Рекомендации по теме
Комментарии
Автор

If this video was helpful to you like, share and subscribe to our channel

DikeChris
visit shbcf.ru