1. What is a `for` loop used for in Python?
2. What is the output of the following code?
for i in range(3):
print(i)
3. What is the syntax for a `for` loop that iterates over a list?
for i in list
for i to list
while i in list
4. What does the `range()` function return in Python?
5. Which loop is better for iterating over a collection?
6. What is the output of the following code?
list = [10, 20, 30]
for i in list:
print(i, end=" ")
7. How do you exit a `for` loop prematurely?
8. What will the following code print?
if i == 2:
break