python—— python for循环

for循环

list  = ['a', 'b', 'c']
for item in list:
	print(item)
print (item)

#
a
b
c

for循环(使用range)

list  = ['a', 'b', 'c']
for i in range(len(list)):
	print(list[i])

#
a
b
c

Guess you like

Origin blog.csdn.net/qq_43201350/article/details/120110118