Python ‐ Cheat Sheet - dishplate/blog GitHub Wiki

Range function 
for value in range(1,6)
    print(value)
1
2
3 to 5
Convert to list
even_num = list(range(2,11,2)
print(even_num)
It starts with 2 then adds 2 and stops at 11
[2,4,6,8,10]

_________________________________
for loop - car is assigned one car name from the cars list until the end.
cars = ["Audi","VW","Toyota","Tata"]
    for car in cars:
       print(car)