infidel wrote:
>>is there any typical usage that shows their difference?
>
>
> I think the general idea is to use lists for homogenous collections and
> tuples for heterogenous structures.
>
> I think the database API provides a good usage that shows their
> differences. When you do cursor.fetchall() after executing a query,
> you get back a list of tuples. Each tuple is one "record" from the
> cursor. "tuple" is even the term used in relational database theory
> when talking about a table row. You shouldn't be able to add or remove
> fields from a query result, so using a tuple is a perfect match for
> this. On the other hand, you can certainly add, delete, or replace
> entire tuples in the result set, so it makes sense to use a list to
> hold the set of tuples.
>
I think you can remove the 'I think' !-)
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.split('@')])"
--
http://mail.python.org/mailman/listinfo/python-list