List and tuple usage distinction??
Peter Hansen
peter at engcorp.com
Wed Sep 1 21:12:58 EDT 2004
Ishwar Rattan wrote:
> I am a little confused about a list and a tuple.
>
> Both can have dissimilar data-type elements, can be returned
> by functions. The only difference that I see is that list is
> mutable and tuple is not (of course list have .append() etc.)
>
> What is a possible scenario where one is preferred over the other?
Does this answer in the FAQ list help?
http://www.python.org/doc/faq/general.html#why-are-there-separate-tuple-and-list-data-types
-Peter
More information about the Python-list
mailing list