for 循環主要用來周遊清單、字元串、檔案等進行操作,預設是循環到最後一個元素為止。
test=dict(a=1,b=2,c=3,d=4)
for i,j in test.items():
print(i,j)
傳回結果:
a 1
b 2
c 3
d 4
本文轉自 歸來仍少年 51CTO部落格,原文連結:http://blog.51cto.com/shaoniana/1976261
for 循環主要用來周遊清單、字元串、檔案等進行操作,預設是循環到最後一個元素為止。
test=dict(a=1,b=2,c=3,d=4)
for i,j in test.items():
print(i,j)
傳回結果:
a 1
b 2
c 3
d 4
本文轉自 歸來仍少年 51CTO部落格,原文連結:http://blog.51cto.com/shaoniana/1976261
font自定義工具 string for錯誤 string find錯誤 html font什麼 for死循環
12-05