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

2.Python Basics Iists,Tuples,Sets,Dictionaries

Thanks for watching the video.

Also I would like to introduce you to our new course on udemy if interested. "Learn Python using Amazon SageMaker".Do try this URL: https://www.udemy.com/course/learn-python-using-amazon-sagemaker/?couponCode=583FD5DF08490CEEDFD0

In this tutorial we have covered Python Data Structures Iists,Tuples,Sets & Dictionaries.
Python Data Structures – Lists, Tuples, Sets, Dictionaries
In this Python Data Structures Tutorial, we will talk about different data structures that Python provides us with.
These include Python list, Python tuple, Python set, and Python dictionaries with their syntax and examples.
So, let’s start Python Data Structure.
What is Python Data Structures?
You can think of a data structure as a way of organizing and storing data such that we can access and modify it efficiently.
Earlier, we have seen primitive data types like integers, floats, Booleans, and strings. Now, we’ll take a deeper look at the non-primitive Python data structures.
Let’s begin with our first Python Data Structures and lists.

What is Python List?

A list in Python is a heterogeneous container for items. This would remind you of an array in C++, but since Python does not support arrays, we have Python Lists.
1. How to Declare Python List?
To use a list, you must declare it first. Do this using square brackets and separate values with commas.
Python Tuple
This Python Data Structure is like a, like a list in Python, is a heterogeneous container for items.
But the major difference between the two (tuple and list) is that a list is mutable, but a tuple is immutable.
This means that while you can reassign or delete an entire tuple, you cannot do the same to a single item or a slice.
To declare a tuple, we use parentheses.
Python Set
This is one of the important Python Data Structures. A Python set is a slightly different concept from a list or a tuple. A set, in Python, is just like the mathematical set. It does not hold duplicate values and is unordered. However, it is not immutable, unlike a tuple.
Let’s first declare a set. Use curly braces for the same.
Since a set is unordered, there is no way we can use indexing to access or delete its elements. Then, to perform operations on it, Python provides us with a list of functions and methods like discard(), pop(), clear(), remove(), add(), and more. Functions like len() and max() also apply on sets.
Python Dictionaries
Finally, we will take a look at Python dictionaries. Think of a real-life dictionary. What is it used for? It holds word-meaning pairs. Likewise, a Python dictionary holds key-value pairs. However, you may not use an unhashable item as a key.
To declare a Python dictionary, we use curly braces. But since it has key-value pairs instead of single values, this differentiates a dictionary from a set.
Conclusion:
we learned about various user-defined data structures using python like lists, tuples, sets, and dictionaries.
All of these have their own advantages and disadvantages. It is highly recommended to refer to our tutorials on each of those to sharpen your axes. See you later.

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

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

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

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