Why tuples ???
Erik Max Francis
max at alcyone.com
Mon Apr 23 12:06:13 EDT 2001
Thomas Weidner wrote:
> I started lerning Python and discovered tuples, but why do they exist
> ?
> What's the difference from a list ?
Because tuples are immutable, which means, for example, they can be used
as keys in a dictionary, whereas lists are mutable, which means they
cannot.
--
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/ \ The great floodgates of the wonder-world swung open.
\__/ Herman Melville
Interstelen / http://www.interstelen.com/
A multiplayer, strategic, turn-based Web game on an interstellar scale.
More information about the Python-list
mailing list