Computer Science, asked by EshaniPrashar, 3 months ago

Explain range() function with the help of an example.​

Answers

Answered by bhavyagoel1412
3

Explanation:

In this example, the range() function is generating a sequence from 0 to 4 . The for loop is then using each value generated by range() , one at a time, to access a value from the sampleList . In Python 3, the range() function generates each number in the sequence one at a time.

Similar questions