0
What should be otput of this..it should be 3 or 4
nums=list(range[5]) print(nums[4])
6 Answers
+ 1
The Answer your looking is 4
+ 1
why can u please me it is from count starta from 0 so it should be 3
+ 1
range(5) means
0
1
2
3
4
There Is No 5 in range(5)
+ 1
@arun kumar
In programming languages counting starts from 0
Not 1
example
we usually count from 1 ,2 ,3 etc..
but in programming languages
you start from 0, 1 , 2 ,3 etc...
0
but m printing print(nums[4])
0 1 2 3
4th is 3
0
yup