suggestions for using tuples instead of list (or vice versa)
Diez B. Roggisch
deetsNOSPAM at web.de
Thu Apr 29 09:04:21 EDT 2004
> Is there any advantage for using tuples? Are they "faster"? Consume
> less memory? When is it better to use tuples instead of lists and when
> better to use lists instead of tuples?
AFAIK tuples are faster and less memory consuming. I personally prefer them
for e.g. returning multiple values from a function or when I know I won't
need the power of a list. But its largely considered a matter of taste.
Google this newsgroup for a plethora of discussions on this subject....
--
Regards,
Diez B. Roggisch
More information about the Python-list
mailing list