filmov
tv
Lec - 15: Introduction to List in Python | Python Tutorials | With Practical and Executed Programs

Показать описание
Lecture by Dr. (Prof.) Mohammad Fahim Akhtar
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:
List
1. Define: Lists are a data type that contain multiple types of data.
Q. What are the main characteristics / properties of Python lists?
2. Lists are a data type that contain multiple types of data.
3. Lists are formed with square brackets, and elements are separated by commas.
4. List items are ordered, changeable (mutable/update), and can accept duplicate values.
5. When we say a list is ordered, it means that the items are in an indexed ordered sequence that will not change.
The list items are indexed: the first item has index [0], the second has index [1], and so on.
6. Accessing forward and backward
7. Range [2:5]
8. Check if Item Exists
To determine if a specified item is present in a list use the in keyword:
Example
Check if "UAE" is present in the list:
country = ["India", "UAE", "KSA"]
if "UAE" in country:
print("Yes, 'UAE' is in the country list")
Follow me on:
Facebook -
Instagram:
Watch Complete Channel:
email:
'
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:
List
1. Define: Lists are a data type that contain multiple types of data.
Q. What are the main characteristics / properties of Python lists?
2. Lists are a data type that contain multiple types of data.
3. Lists are formed with square brackets, and elements are separated by commas.
4. List items are ordered, changeable (mutable/update), and can accept duplicate values.
5. When we say a list is ordered, it means that the items are in an indexed ordered sequence that will not change.
The list items are indexed: the first item has index [0], the second has index [1], and so on.
6. Accessing forward and backward
7. Range [2:5]
8. Check if Item Exists
To determine if a specified item is present in a list use the in keyword:
Example
Check if "UAE" is present in the list:
country = ["India", "UAE", "KSA"]
if "UAE" in country:
print("Yes, 'UAE' is in the country list")
Follow me on:
Facebook -
Instagram:
Watch Complete Channel:
email:
'