Introduction to Lists :
            A Python list is a built-in, ordered, and mutable collection data type used to store multiple items in a single variable. These items can be of any data type, including integers, strings, booleans, and even other lists. The values are stored inside square brackets " [ ] ".

Example :

Why Lists are Used ?

  • Data Handling
  • Tables & Records
  • Menu systems
  • Real-world applications
Features of Lists :
Ordered - meaning the order remains the same until changed
Mutable - meaning one can change , update or replace list items
Allow Duplicates - meaning list can store repeated values
Allow Multiple Data Types - meaning same list can store different kind of values
Dynamic - meaning items can be added , removed or modified
Supports Indexing and Slicing
Accessing List Items in Python :
Each item in a list has a position called an indexIndexing starts from 0.
Value1020304050
Forward Index01234
Negative Index-5-4-3-2-1
Access Item by Index :

Access a range of Items :

Access Item thorugh Loops