星期三, 8月 05, 2009

How to transfer tuple to list

tuple 無法修改, 要修改其中的 element 就要使用 list. 把 tuple 轉為 list:

a = (1,2,3)
al = list(a)

就這麼簡單...

沒有留言: