python兩個一維列表合併成一個二維列表

>>> list1 = [1,2,3,4,4] >>> list2 = [2,3,4,5,2] >>> z = list(zip(list1,list2)) >>> z [(1, 2), (2, 3), (3, 4), (4, 5), (4, 2)] >>> z[1][1] 3 >>> z[0][1] 2 >>> z[2] (3, 4)
相關文章
相關標籤/搜索