[Pythonmac-SIG] Tuples
Henning Hraban Ramm
hraban at fiee.net
Sun Feb 3 17:44:03 CET 2008
Am 2008-02-03 um 16:54 schrieb Grzegorz Laszczyk:
> I have a newbie question.
> Do you use tuples? If yes, maybe can you explain me where and why.
> I know, how to use strings, dictionaries, lists. But tulpes? Python is
> my first language, where I found this.
You can use tuples, where
1. they're expected
2. you need a "list" that never changes (you can assign a new tuple,
of course)
2a. constants
AFAIK tuples are a bit faster and need less memory than lists, esp.
with big datasets.
see also http://docs.python.org/tut/
node7.html#SECTION007300000000000000000
Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net
https://www.cacert.org (I'm an assurer)
More information about the Pythonmac-SIG
mailing list