“петля в питоне” Ответ

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

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

OUTPUT

0
1
2
3
4
Fancy Flatworm

Как сделать петлю в Python

while True:
	#yourcode here
ultra

Питон для петли

# Python for loop

for i in range(1, 101):
  # i is automatically equals to 0 if has no mention before
  # range(1, 101) is making the loop 100 times (range(1, 151) will make it to loop 150 times)
  print(i) # prints the number of i (equals to the loop number)
  
for x in [1, 2, 3, 4, 5]:
  # it will loop the length of the list (in that case 5 times)
  print(x) # prints the item in the index of the list that the loop is currently on
Unknown Species

Питон для петли

for i in range(1.10):
	print(i)
    
#output: 1,2,3,4,5,6,7,8,9,10
AMXX

Питон для петли

for x in range(6): #The Loop
  print(x) #Output 0,1,2,3,4,5
Vasilije Dimitrijevic

петля в питоне

# A Sample Python program to show loop (unlike many 
# other languages, it doesn't use ++) 
# this is for increment operator here start = 1,  
# stop = 5 and step = 1(by default) 
print("INCREMENTED FOR LOOP") 
for i in range(0, 5): 
   print(i) 
  
# this is for increment operator here start = 5,  
# stop = -1 and step = -1  
print("\n DECREMENTED FOR LOOP") 
for i in range(4, -1, -1): 
   print(i) 
Super Shark

Ответы похожие на “петля в питоне”

Вопросы похожие на “петля в питоне”

Больше похожих ответов на “петля в питоне” по Python

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

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