Computer Science

Which of the following Python functions is used to iterate over a sequence of numbers by specifying a numeric end value within its parameters ?

  1. range()
  2. len()
  3. substring()
  4. random()

Python Control Flow

1 Like

Answer

range()

Reason — The range() function in Python is used to iterate over a sequence of numbers by specifying a numeric end value within its parameters. It takes parameters for the start, stop, and step values to define the range of numbers to be generated.

Answered By

2 Likes


Related Questions