Toptube Video Search Engine



Title:For loops in Python are easy πŸ”
Duration:05:06
Viewed:258,739
Published:23-10-2022
Source:Youtube

#python #course #tutorial 00:00:00 iterate forwards 00:01:39 iterate backwards 00:02:15 step 00:02:44 iterate over a string 00:03:26 continue 00:04:19 break 00:04:35 conclusion # for loops = execute a block of code a fixed number of times. # You can iterate over a range, string, sequence, etc. # ---------------- EXAMPLE 1 ---------------- for x in range(1, 11): print(x) # ---------------- EXAMPLE 2 ---------------- for x in reversed(range(1, 11)): print(x) print("Happy New Year!") # ---------------- EXAMPLE 3 ---------------- for x in range(1, 11, 2): print(x) # ---------------- EXAMPLE 4 ---------------- credit_card = "1234-5678-9012-3456" for x in credit_card: print(x) # ---------------- CONTINUE ---------------- for x in range(1, 21): if x == 13: continue else: print(x) # ---------------- BREAK ---------------- for x in range(1, 21): if x == 13: break else: print(x)



SHARE TO YOUR FRIENDS


Download Server 1


DOWNLOAD MP4

Download Server 2


DOWNLOAD MP4

Alternative Download :