[Tutor] Why use tuples?

Simon Brunning SBrunning@trisystems.co.uk
Thu, 20 Sep 2001 10:26:31 +0100


> From:	Danny Kohn [SMTP:danny.kohn@systematik.se]
> What I understand about the difference in functionality between lists and
> tuples is that tuples are restricted lists. But what why would I want to
> use tuples? What is the benifit?
 
See <http://www.python.org/cgi-bin/faqw.py?req=all#6.15> on the FAQ.

What this *doesn't* seem to mention is that you can use an immutable tuple
as the key of a dictionary, whereas you cannot use a mutable list.

Cheers,
Simon Brunning
TriSystems Ltd.
sbrunning@trisystems.co.uk




-----------------------------------------------------------------------
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorised. If you are not the intended recipient, any disclosure,
copying, distribution, or any action taken or omitted to be taken in
reliance on it, is prohibited and may be unlawful. TriSystems Ltd. cannot
accept liability for statements made which are clearly the senders own.