Tuple to list?

Andrei project5 at redrival.net
Sat Nov 15 12:28:30 EST 2003


Evan Patterson wrote on Sat, 15 Nov 2003 09:11:47 -0800 (PST):

> How do you convert a tuple to a list? 
> Thanks in advance.

>>> t = ((2,(3,4),"apple"))
>>> t
(2, (3, 4), 'apple')
>>> list(t)
[2, (3, 4), 'apple']

-- 
Yours,

Andrei

=====
Mail address in header catches spam. Real contact info (decode with rot13):
cebwrpg5 at jnanqbb.ay. Fcnz-serr! Cyrnfr qb abg hfr va choyvp cbfgf. V ernq
gur yvfg, fb gurer'f ab arrq gb PP.






More information about the Python-list mailing list