filmov
tv
Python Tutorial for Beginners 2020 - Tuple

Показать описание
Hey guys, this is the 12th video for my Python's tutorial course for beginners. We will be covering all the basics about Python including installing and setting up the development environment, variables, data structures, iterations, conditionals, operators, error handlings, functions, classes and many more. The aim for this tutorial is to provide with a solid foundation layer for Python and programming in general so that we can proceed to more advanced level Python tutorials and also look into different application areas of using Python such as web development and data science.
In this video, we are going to talk about tuple data type in Python. So tuple is similar to the list in that it is a sequence data type and thus it can hold various different elements into the tuple. And the same slicing and indexing rules that we've learned from both string and list videos can be applied to tuple as well. But the difference here is that tuple is immutable meaning none of the elements in the tuple can be altered while the list is mutable. So understanding the difference between tuple and list will be very important as not only it is one of the most frequently asked Python interview question but also it will help us understand which data type to use based on the requirements that you have. Since tuple is an immutable data type, it tends to have better performance than list, and can fit well into the situation to prevent any write-operations.
=============================================================
Timestamps:
00:00 Introduction
00:15 What is tuple?
00:42 Creating a tuple
02:37 Tuple unpacking
04:15 Accessing tuple elements
05:56 Tuple’s immutability
08:09 Other tuple operations
09:59 Tuple methods
=============================================================
=============================================================
GitHub link:
=============================================================
In this video, we are going to talk about tuple data type in Python. So tuple is similar to the list in that it is a sequence data type and thus it can hold various different elements into the tuple. And the same slicing and indexing rules that we've learned from both string and list videos can be applied to tuple as well. But the difference here is that tuple is immutable meaning none of the elements in the tuple can be altered while the list is mutable. So understanding the difference between tuple and list will be very important as not only it is one of the most frequently asked Python interview question but also it will help us understand which data type to use based on the requirements that you have. Since tuple is an immutable data type, it tends to have better performance than list, and can fit well into the situation to prevent any write-operations.
=============================================================
Timestamps:
00:00 Introduction
00:15 What is tuple?
00:42 Creating a tuple
02:37 Tuple unpacking
04:15 Accessing tuple elements
05:56 Tuple’s immutability
08:09 Other tuple operations
09:59 Tuple methods
=============================================================
=============================================================
GitHub link:
=============================================================