Quiz on Python Range Function



1. What does the range function in Python return?
2. Which of the following is the correct syntax for the range function?
3. What will be the output of 'list(range(5))'?
4. What is the default value of 'start' in the range function?
5. If you use range(2, 10, 2), what numbers will be generated?

Advertisements