python - changing a for loop to a while loop -


i wondering how change following lines of codes use while loop instead of for loop.

for num in range(10):  print(num+1) 

it prints out following:

1 2 3 4 5 6 7 8 9 10 

thanks!

start = 0 while start != 10:     start = start + 1     print(start) 

hope hepls


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -