Re: Tuple to list?

From: Andrei (project5_at_redrival.net)
Date: 11/15/03


Date: Sat, 15 Nov 2003 18:28:30 +0100
To: python-list@python.org

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@jnanqbb.ay. Fcnz-serr! Cyrnfr qb abg hfr va choyvp cbfgf. V ernq
gur yvfg, fb gurer'f ab arrq gb PP.