tuple versus list
SPE - Stani's Python Editor
spe.stani.be at gmail.com
Sun Oct 16 10:24:25 EDT 2005
It's simple: if you want to modify the data structure after it has been
created, use lists, otherwise tuples.
Tuples are much more memory efficient, so your program will consume
less memory and probably run faster. So preferably use tuples. However
with tuples you can't do:
t[0] = 'new value'
t.append('new value')
These statements are possible with lists.
Stani
--
SPE - Stani's Python Editor (http://pythonide.stani.be)
More information about the Python-list
mailing list