List to Tuple and Tuple to List?

Davy zhushenli at gmail.com
Tue Nov 6 06:18:33 EST 2007


Hi all,

I am curious about whether there is function to fransform pure List to
pure Tuple and pure Tuple to pure List?

For example,

I have list L = [[1,2,3],[4,5,6]]
something list2tuple() will have T=list2tuple(L)=((1,2,3),(4,5,6))

And the tuple2list()

Any suggestions are welcome!

Best regards,
Davy




More information about the Python-list mailing list