0
嗨我添加元組是一個字典的值,我已經提取元組,並需要添加到一個可迭代的項目,說一個空列表元組有點困難。即將字典的值添加到列表
path = [1,2,3,4]
pos = {1:(3,7), 2(3,0),3(2,0),4(5,8)}
h = []
for key in path:
if key in pos:
print pos[key]
h.append(pos[Key])#Gives an error
請如何將pos [鍵]中的值追加到h。由於