Each collection solves a different data problem.
Choose based on whether order, changeability, uniqueness, or access by a meaningful key matters most.
tasks = ["Design", "Code"]
coordinates = (45.26, 19.83)
print(tasks[0])
print(coordinates[1])Lists keep ordered values you can change, while tuples keep ordered values whose items are not replaced.
Try changing one value, then explain which part of the collection changed and why.
Keep this in mind: Read the collection operation before predicting the result.
tasks = ["Design", "Code", "Test"]
coordinates = (45.26, 19.83)
tags = {"python", "django", "python"}
student = {"name": "Ana", "course": "Python"}
print(tasks[0])
print(coordinates[1])
print(len(tags))
print(student["name"])Run the example, then change one value and observe the result.
tasks = ["Design", "Code"]
tasks.append("Test")A list is useful when order matters and you need to add, remove, or replace items.
coordinates = (45.26, 19.83)A tuple keeps related values in order when its items should not be replaced.
tags = {"python", "django", "python"}A set removes duplicates and does not provide positional indexing.
student = {"name": "Ana", "city": "Novi Sad"}A dictionary connects meaningful keys to values for direct lookup.
