“Как бежать за петлей в Python” Ответ

Как бежать за петлей в Python

for i in range(5):
  print(i)

OUTPUT

0
1
2
3
4
Fancy Flatworm

Как использовать петлю в Python

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)
Koanarec

Для петли Python

iteration_number = 10 # can be any amount or how many times you want to iterate

for iteration in range(iteration_number): # how many iterations - iteration_number variable
  print(iteration)
RohBot

Ответы похожие на “Как бежать за петлей в Python”

Вопросы похожие на “Как бежать за петлей в Python”

Больше похожих ответов на “Как бежать за петлей в Python” по Python

Смотреть популярные ответы по языку

Смотреть другие языки программирования