Python sample question with answer 15

Question:
You want to print the message “Access denied” 5 times.
Iterative statement

  1. for i in range(5):
      print("Access denied")
  2. for i in range(1, 7):
      print("Access denied")
  3. for i in [2, 8, 9, 10]:
      print("Access denied")
  4. for i in [5]:
      print("Access denied")
Answer:
A - is the correct answer