Slicing in Python Lists || Python List || Python Data Structures - Part 4

preview_player
Показать описание
Python Data Structures - Python List - Slicing in Python Lists

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
DataCamp premium Subscription at $49/year.
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

List is one most commonly used data structure in python.

The concept of Slicing on a Python List is covered in this video:

Slicing allows us to get sublist of a main list.
Syntax: lst[start:stop:step]
start refers to the index of the element which is used as a start of our slice.
stop refers to the index of the element we should stop just before to finish our slice.
step allows you to take each nth-element within a start:stop range

More Programs on Python List:

-~-~~-~~~-~~-~-
-~-~~-~~~-~~-~-
Рекомендации по теме
Комментарии
Автор

Python Pattern Programming - Letter Patterns from A to Z:

Programminginpython
welcome to shbcf.ru