
November 15th, 2003, 11:41 AM
|
 |
Hello World :)
|
|
Join Date: Mar 2003
Location: Hull, UK
|
|
|
Python is actually pretty efficent at converting tuples to lists and back again.. not to mention it being very easy!
I'm sure you've seen (if not used used) the str() type-cast function before, well same thing here with list()..
>>> t = ('my', 'name', 'is', 'mr', 'tuple')
>>> t
('my', 'name', 'is', 'mr', 'tuple')
>>> l = list(t)
>>> l
['my', 'name', 'is', 'mr', 'tuple']
>>>
Mark
__________________
programming language development: www.netytan.com – Hula
|