List vs Dictionary in Python
List is position-based. names[0] is the first student. Dict is key-based. marks["Asha"] is 90. Use a list when order matters and you walk items in a row. Use a dict when you look up by a label — name, roll, email — not by seat number.
You can store dicts inside a list (rows of students) or lists inside a dict (hobbies per name). Index vs key is the clean comparison line. Pick dict when “find Asha’s marks” should not scan the whole list.
List vs Dictionary in Python — output — Asha then 90. List by position, dict by name.
{ "Asha": 90, "Ravi": 85 }
│ │
key valueWhen would you pick dict over list?