πŸ“Š Python
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

πŸ‘οΈ
62
Total Visits
πŸ“½οΈ
10 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
90%
Success Rate