Why tuples ???
Konrad Hinsen
hinsen at cnrs-orleans.fr
Mon Apr 23 11:55:54 EDT 2001
"Thomas Weidner" <wolf359_ at gmx.net> writes:
> I started lerning Python and discovered tuples, but why do they exist ?
> What's the difference from a list ?
Tuples are immutable, their elements never change. This means, for
example, that you can use a tuple as an index to a dictionary, whereas
you cannot use a list there.
--
-------------------------------------------------------------------------------
Konrad Hinsen | E-Mail: hinsen at cnrs-orleans.fr
Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.56.24
Rue Charles Sadron | Fax: +33-2.38.63.15.17
45071 Orleans Cedex 2 | Deutsch/Esperanto/English/
France | Nederlands/Francais
-------------------------------------------------------------------------------
More information about the Python-list
mailing list