KnowledgeBoat Logo
|

Robotics & Artificial Intelligence

How is the range() function typically used in a for loop?

  1. range(start, end)
  2. range(end)
  3. range(start, end, step)
  4. range(step)

Python Control Flow

1 Like

Answer

range(start, end, step)

Reason — The range() function can be used with one, two or three parameters. The complete form is range(start, end, step) where start is the initial value, end is the stop value and step is the update value.

Answered By

1 Like


Related Questions