A

Admin • 831.35K Points
Coach

Q. What does `range(1, 10, 2)` return?

  • (A) [1,2,3,4,5,6,7,8,9]
  • (B) [1,3,5,7,9]
  • (C) [2,4,6,8,10]
  • (D) [1,10,2]
  • Correct Answer - Option(B)
  • Views: 20
  • Filed under category Python
  • Hashtags:

Explanation by: Admin
`range(start, stop, step)` generates numbers starting from `start` to `stop-1` with step size `step`.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.