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

Python Training Program Session 12 || Advanced Built-in Data Types || Python Collections - List

📁 Лайфстайл 👁️ 16 📅 02.12.2023

Hello Everyone! Today in this video I am going to explain Advanced Built-in Data Types , Python Collections - List.

✻ I really hope you find this video useful.

Advanced Built-in Data Types :
Python Collections (Arrays) :
There are four collection data types in the Python programming language:

List is a collection which is ordered and changeable. Allows duplicate members.
Tuple is a collection which is ordered and unchangeable. Allows duplicate members.
Set is a collection which is unordered and unindexed. No duplicate members.
Dictionary is a collection which is unordered, changeable and indexed. No duplicate members.
When choosing a collection type, it is useful to understand the properties of that type. Choosing the right type for a particular data set could mean retention of meaning, and, it could mean an increase in efficiency or security.

List :
A list is a collection which is ordered and changeable.
In Python lists are written with square brackets [].

Access Items :
You access the list items by referring to the index number.

Negative Indexing :
Negative indexing means beginning from the end, -1 refers to the last item, -2 refers to the second last item etc.

Range of Indexes: List Slicing
A slice is a span of items that are taken from a sequence.
When you take a slice from a list, you get a span of elements from within the list.
To get a slice of a list, you write an expression in the following general format:

list_name[start : end]

You can specify a range of indexes by specifying where to start and where to end the range.
When specifying a range, the return value will be a new list with the specified items.

Change Item Value :
To change the value of a specific item, refer to the index number.

in operator: Check if Item Exists
To determine if a specified item is present in a list use the in keyword.

List Length :
To determine how many items a list has, use the len() function.

Add Items :
To add an item to the end of the list, use the append() method.
To add an item at the specified index, use the insert() method.

Remove Item :
There are several methods to remove items from a list:
The pop() method removes the specified index, (or the last item if index is not specified).
The del keyword removes the specified index.
The del keyword can also delete the list completely.

Copy a List :
You cannot copy a list simply by typing list2 = list1, because: list2 will only be a reference to list1, and changes made in list1 will automatically also be made in list2.
There are ways to make a copy, one way is to use the built-in List method copy().
Another way to make a copy is to use the built-in method list().

Join Two Lists: Concatenating
There are several ways to join, or concatenate, two or more lists in Python.
One of the easiest ways are by using the + operator.
Another way to join two lists are by appending all the items from list2 into list1, one by one.
Or you can use the extend() method, whose purpose is to add elements from one list to another list:
Use the extend() method to add list2 at the end of list1.

Two-Dimensional Lists :
A two-dimensional list is a list that has other lists as its elements.
The elements of a list can be virtually anything, including other lists.

#Python #PythonTraining #JupyterNotebook #PythonForBeginners #List #TrainingProgram #Learning

---------------------------------------------------------------------------

THANK YOU so much for watching!
Please make sure to LIKE and SHARE the video and SUBSCRIBE to the channel for more such videos :)

---------------------------------------------------------------------------
CONNECT WITH ME ON:
✻ LinkedIn: https://www.linkedin.com/in/sunidhi-pandey-96008b192/
✻ GitHub: https://github.com/sunidhi2001
✻ YouTube channel: https://www.youtube.com/channel/UCypX76paWuY76JC0rtbG61w
✻ Instagram : https://www.instagram.com/20sunidhi/

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Python Training Program Session 12 || Advanced Built-in Data Types || Python Collections - List», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

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

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

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