Python sample question with answer 16

Question:
You want to print out a sequence of numbers starting at 10 and ending at 30.
Iterative statement

  1. for i in [10, 20, 30]:
      print(i)
  2. for i in range(10, 30):
      print(i)
  3. for i in range(10, 31):
      print(i)
  4. for i in range(30):
      print(i)
Answer:
C - is the correct answer