Q. What does the `range(5)` function return?

  • (A) A list from 1 to 5
  • (B) A list from 0 to 5
  • (C) A range object from 0 to 4
  • (D) An error
πŸ’¬ Discuss
βœ… Correct Answer: (C) A range object from 0 to 4
Explanation: `range(5)` creates a range from 0 up to, but not including, 5.
Explanation by: Mr. Dubey
`range(5)` creates a range from 0 up to, but not including, 5.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
70
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
85%
Success Rate