Q. What is the purpose of the range() function in Python?

A
Create a list of numbers
B
Generate a sequence of numbers
C
Sort a list
D
Convert a string to a number
Solution:

The range() function generates a sequence of numbers that can be used in loops or converted to a list.

Entri PDF Icon

Get Question Bank

Strengthen Your Practice with our comprehensive question bank.

Entri Contact Image

Get Expert Advice for Free: Register for Your Free Consultation Now!