filmov
tv
Data Structures in Python: Lists, Tuples, Sets & Dictionaries | Python Tutorial for Beginners

Показать описание
*Data Structures in Python: Lists, Tuples, Sets & Dictionaries | Python Tutorial for Beginners*
Hello, welcome back to the python tutorial for beginners powered by upGrad. In this video, you will understand more about data structure in python
Data structures in Python are methods for effectively accessing and modifying data by structuring and storing it. Numerous flexible built-in data structures in Python can be utilised to address a wide range of issues. The following are a few of the most used Python data structures:
*Lists*
Lists are the most basic data structure available in python that can hold multiple variables/objects together for ease of use.
*Tuples*
A tuple contains a sequence of comma-separated values within parentheses. An important feature of a tuple is immutability, which means the elements of a tuple cannot be altered. It is used to store data such as employee information, which is not allowed to be changed.
Tuples are ordered in sequences, which means the order in which the elements are inserted remains the same. This makes them flexible for indexing and slicing just like lists. Using slicing, you were able to obtain sections of the data from a list; here, you will be able to obtain a subset of elements.
*Sets*
A data structure 'sets' that is unordered, or, in other words, it doesn’t maintain an order in which elements are inserted. This makes sets unfit for indexing or slicing, but what is their use then?
*Dictionaries*
Dictionary is one data structure that is very useful because of the way in which it is defined. Let's take a look at a small example to understand this. Imagine we have employee data with the following attributes: employee id, name, age, designation. Now, let’s say you want to retrieve employee details based on employee id (since this is unique to each employee). How would you store the data?
Time Stamps:
00:49 - Lists
16:41 - Difference between sort and sorted
19:13 - Shadow copying
22:39 - Tuples
23:06 - Slicing
24:40 - Concatenating Tuples
27:54 - Immutability of Tuples
30:15 - Sorting a Tuples
32:08 - Nested Tuples
33:32 - Packing and Unpacking Tuples
37:36 - Sets
37:36 - Dictionaries
#datastructures #pythontutorial
Get in touch with us (24x7):
Toll-Free number: 1800 210 2020
WhatsApp Chat: +91 8454 888 222
Hello, welcome back to the python tutorial for beginners powered by upGrad. In this video, you will understand more about data structure in python
Data structures in Python are methods for effectively accessing and modifying data by structuring and storing it. Numerous flexible built-in data structures in Python can be utilised to address a wide range of issues. The following are a few of the most used Python data structures:
*Lists*
Lists are the most basic data structure available in python that can hold multiple variables/objects together for ease of use.
*Tuples*
A tuple contains a sequence of comma-separated values within parentheses. An important feature of a tuple is immutability, which means the elements of a tuple cannot be altered. It is used to store data such as employee information, which is not allowed to be changed.
Tuples are ordered in sequences, which means the order in which the elements are inserted remains the same. This makes them flexible for indexing and slicing just like lists. Using slicing, you were able to obtain sections of the data from a list; here, you will be able to obtain a subset of elements.
*Sets*
A data structure 'sets' that is unordered, or, in other words, it doesn’t maintain an order in which elements are inserted. This makes sets unfit for indexing or slicing, but what is their use then?
*Dictionaries*
Dictionary is one data structure that is very useful because of the way in which it is defined. Let's take a look at a small example to understand this. Imagine we have employee data with the following attributes: employee id, name, age, designation. Now, let’s say you want to retrieve employee details based on employee id (since this is unique to each employee). How would you store the data?
Time Stamps:
00:49 - Lists
16:41 - Difference between sort and sorted
19:13 - Shadow copying
22:39 - Tuples
23:06 - Slicing
24:40 - Concatenating Tuples
27:54 - Immutability of Tuples
30:15 - Sorting a Tuples
32:08 - Nested Tuples
33:32 - Packing and Unpacking Tuples
37:36 - Sets
37:36 - Dictionaries
#datastructures #pythontutorial
Get in touch with us (24x7):
Toll-Free number: 1800 210 2020
WhatsApp Chat: +91 8454 888 222