Home »
MCQs »
Python MCQs
The ___ is a built-in function that returns a range object that consists series of integer numbers, which we can iterate using a for loop
46. The ___ is a built-in function that returns a range object that consists series of integer numbers, which we can iterate using a for loop.
- range()
- set()
- dictionary{}
- None of the mentioned above
Answer: A) range()
Explanation:
This type represents an immutable sequence of numbers and is commonly used in for loops to repeat a specific number of times a given sequence of numbers. The range() function in Python generates an immutable sequence of numbers beginning with the given start integer and ending with the given stop integer. For loops, we can use the range() built-in function to return an object that contains a series of integer numbers, which we can then iterate through using a for loop.