Python for loop ➰

6 Views
Published
python for loops tutorial example explained

#python #for #loop

# for loop = a statement that will execute it's block of code
# a limited amount of times
#
# while loop = unlimited
# for loop = limited

import time

#for i in range(10):
#print(i+1)

#for i in range(50,100+1,2):
#print(i)

#for i in "Bro Code":
#print(i)

for seconds in range(10,0,-1):
print(seconds)
time.sleep(1)
print("Happy New Year!")

––––––––––––––––––––––––––––––
Up In My Jam (All Of A Sudden) by - Kubbi https://soundcloud.com/kubbi
Creative Commons — Attribution-ShareAlike 3.0 Unported— CC BY-SA 3.0
Free Download / Stream: http://bit.ly/2JnDfCE
Music promoted by Audio Library https://youtu.be/tDexBj46oNI
––––––––––––––––––––––––––––––
Category
Bro Code
Tags
For Loop, Python (Software), loop
Be the first to comment