tuple versus list

Xah Lee xah at xahlee.org
Sun Oct 16 07:06:15 EDT 2005


suppose i'm going to have a data structure like this:

[
[imgFullPath,(width, height)],
[imgFullPath,(width, height)],
[imgFullPath,(width, height)],
[imgFullPath,(width, height)],
...
]

should i use (width,height) or [width,height]?
what advantage i get to use n-tuple instead of the generic list?

Thanks.

 Xah
 xah at xahlee.orghttp://xahlee.org/




More information about the Python-list mailing list