位置:首頁(yè) > 軟件操作教程 > 編程開(kāi)發(fā) > Python > 問(wèn)題詳情

python的?For語(yǔ)句循環(huán)怎么寫(xiě)?

提問(wèn)人:楊紫紅發(fā)布時(shí)間:2020-11-26

For語(yǔ)句(遍歷序列的元素)

for item in [3, 4, 10, 25]:

print item

# Print characters one at a time

for c in "Hello World":

print c

# Loop over a range of numbers

for i in range(0,100,2):

print i

for i in range(len(list1)):

print list1[i]


繼續(xù)查找其他問(wèn)題的答案?

相關(guān)視頻回答
回復(fù)(0)
返回頂部