Tuple to list?

D

Dennis Lee Bieber

Evan Patterson fed this fish to the penguins on Saturday 15 November
2003 09:11 am:
How do you convert a tuple to a list?

<sigh>

[wulfraed@beastie wulfraed]$ python
Python 2.2 (#1, Nov 5 2002, 15:43:24)
[GCC 2.96 20000731 (Mandrake Linux 8.2 2.96-0.76mdk)] on linux-i386
Type "help", "copyright", "credits" or "license" for more information.
tup = ('a one', 'an a two', 'and some bubbles')
lst = list(tup)
lst ['a one', 'an a two', 'and some bubbles']

Did you bother looking at the python documentation at all?

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,170
Messages
2,570,921
Members
47,464
Latest member
Bobbylenly

Latest Threads

Top