Python Lists
A list is an ordered, changeable row of items. names = ["Asha", "Ravi"]. Index starts at 0: names[0] is Asha. Negative: names[-1] is the last. Length: len(names). This is the collection you will use every day.
Mutable means you can change it. append("Neha") adds at the end. pop() removes the last. names[0] = "Asha K" overwrites. Slice names[0:2] is a new list — original stays unless you assign back.
Let’s take this on the board. Start ["Asha", "Ravi"]. append Neha. len is 3. print names[0] → Asha. names[3] → IndexError. append adds one item; extend adds many. Mixing them up is a viva trap.
Interview line: ordered + mutable + indexable. Tuple is ordered but cannot change. Dict is key→value, not index. Pick list when order and edits both matter.
Python Lists — output — 3, Asha, then ['Asha', 'Ravi', 'Neha'].
index → 0 1 2 list → [Asha, Ravi, Neha]
Define list with three properties and one method.