Thursday, October 25, 2007

Python: Copy a Tuple to a List

Okay, here's how to copy a tuple to a a list, i.e., to an array.



>>> [x, y, z] = t
>>> a = []
>>> a[:] = t
>>> a
[1, 2, 3]