Python·100 questions

What are the differences between lists, tuples, sets?

Answer
List — mutable: [1,2,3].
Tuple — immutable: (1,2,3).
Set — no duplicates: {1,2,3}.
Dictionary — key-value pairs.
Tuples are hashable.
Was this answer helpful?

More questions in this topic

Related questions from other topics