如何用于环内部的功能在蟒蛇

代码示例

2
0

如何使用一个循环中的蟒蛇

a_list = [1,2,3,4,5]

#this loops through each element in the list and sets it equal to x
for x in a_list:
	print(x)
0
0

运行一个循环中的蟒蛇

for x in range(6):
  print(x)
 

其他语言

此页面有其他语言版本

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................