Answers for "different ways of writing for loop in python"

7

loops in python

#While Loop:
while ("condition that if true the loop continues"):
  #Do whatever you want here
else: #If the while loop reaches the end do the things inside here
  #Do whatever you want here

#For Loop:
for x in range("how many times you want to run"):
  #Do whatever you want here
Posted by: Guest on September-24-2020
-1

pyton for

for x in range(6):
  print(x)
Posted by: Guest on November-14-2020

Code answers related to "different ways of writing for loop in python"

Python Answers by Framework

Browse Popular Code Answers by Language