filmov
tv
Lec-17: Tuple in Python | Python Data Types | Python Tutorials | #live_class_with_students | #ai

Показать описание
Lecture by Dr. (Prof.) Mohammad Fahim Akhtar
If you want to join a class for Python or AI, contact us here:
+971-542024256 (UAE)
+91-860 346 2019 (India)
I'm uploading each lecture video with an example and executing programmes in Jupiter Notebook to help you understand it. You should also understand programming concepts. Shorter videos are easier to watch and understand, so practice often. If you have not yet subscribed, please do so and leave a comment because I want to improve education for all students, especially those who are economically weak.
In addition, I have included a detailed explanation here.
Topics covered in this session:
Tuple
1. Define:
Tuples are used to store multiple items in the same variable.
A tuple is a collection that is ordered and unchangeable.
Tuples are written using round brackets, which is also known as
parenthesis.
2. Create Tuple
3. Know Type of class using 'Type' command
print(type(name_of_tuple))
4. Tuple items are ordered, unchangeable/immutable, and allow duplicate
values.
5. Tuple items are indexed, the first item has index [0], the second item has
index [1] etc.
When we say that tuples are ordered, it means that the items have a
defined order, and that order will not change.
Tuples are unchangeable, meaning that we cannot change, add or
remove items after the tuple has been created.
Allow Duplicates
Since tuples are indexed, they can have items with the same value:
tp = (“UAE", “KSA", “India", “Japan", “UK")
print(tp)
Facebook:
Instagram:
Watch complete Tutorial Series:
email:
If you want to join a class for Python or AI, contact us here:
+971-542024256 (UAE)
+91-860 346 2019 (India)
I'm uploading each lecture video with an example and executing programmes in Jupiter Notebook to help you understand it. You should also understand programming concepts. Shorter videos are easier to watch and understand, so practice often. If you have not yet subscribed, please do so and leave a comment because I want to improve education for all students, especially those who are economically weak.
In addition, I have included a detailed explanation here.
Topics covered in this session:
Tuple
1. Define:
Tuples are used to store multiple items in the same variable.
A tuple is a collection that is ordered and unchangeable.
Tuples are written using round brackets, which is also known as
parenthesis.
2. Create Tuple
3. Know Type of class using 'Type' command
print(type(name_of_tuple))
4. Tuple items are ordered, unchangeable/immutable, and allow duplicate
values.
5. Tuple items are indexed, the first item has index [0], the second item has
index [1] etc.
When we say that tuples are ordered, it means that the items have a
defined order, and that order will not change.
Tuples are unchangeable, meaning that we cannot change, add or
remove items after the tuple has been created.
Allow Duplicates
Since tuples are indexed, they can have items with the same value:
tp = (“UAE", “KSA", “India", “Japan", “UK")
print(tp)
Facebook:
Instagram:
Watch complete Tutorial Series:
email:
Комментарии