list vs tuple

EuphoriaDj eddthompson at ssi.nospamhere.parlorcity.com
Fri Mar 30 06:25:08 CEST 2001


"Simon Brunning" <SBrunning at trisystems.co.uk> wrote in message
news:mailman.985789357.19622.python-list at python.org...
> > From: deadmeat [SMTP:root@[127.0.0.1]]
> > Whats the practical difference between a list[] and a tuple() ?
> >
> > A tuple seems to be a very basic list, so unless it's faster, what's the
> > point of it?
>
> Off the top of my head - A tuple is immutable, and therefore hashable, and
> therefore can be used as a key to a dictionary. I'm sure that there are
> other things...
>
what do you mean by hashable?





More information about the Python-list mailing list