Iteration Examples Flashcards

1
Q

How to set range in for loop ?

A
We have two methods:
1. for x in [1,2,3,4,5]:
         print(x)
2. for x in range(1,10):
           print(x)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly