+ 1
wrong answer in Python Tutorial "Range"
So here's the question: What is the result of this code? nums = list(range(5)) print(nums[4]) My answer is 3 but the site says 4 is correct. I think it's WRONG. Simply because range will give you integers that starts at [0, 1, 2, 3, 4] What do you think?
1 ответ
- 1
Don't you think if it was wrong then someone else would have brought that up before you did?
Kindly learn the course in detail and do not miss these small concepts like 0 indexing.