Lists and Tuples

Michael Hudson mwh at
Fri Dec 5 13:46:48 CET 2003

Dennis Lee Bieber <wlfraed at> writes:

> Jeff Wagner fed this fish to the penguins on Thursday 04 December 2003 
> 21:19 pm:
> > tuple. So, what's the difference and why choose one over the other?
> >
>         A tuple can be the key for a dictionary, a list can't.
>         Not sure of a tuple containing a list, though...

Nope.  A tuple is hashable iff all of its elements are.


  Now this is what I don't get.  Nobody said absolutely anything
  bad about anything.  Yet it is always possible to just pull
  random flames out of ones ass.

More information about the Python-list mailing list