3 ms·
So why does Python distinguish between a list and a tuple at all?
by jl6 12y ago
So why does Python distinguish between a list and a tuple at all?
- hueving 12y agoOne is mutable, one is not. Performance. Also, look up namedtuple. Useful for returning multiple values.
- dragonwriter 12y agoBecause the distinction between a mutable list and an immutable list is still meaningful in a dynamic language like python.