- 3
Does slicing exclude
Eg : [0:10] #is 10 excluded while excluding
6 Respostas
+ 4
No it's exclusive, [ 0 : 10 ] goes from 0 to 9.
+ 7
Wayne ,
why don't you do a try by yourself? it's just to write one line of code like:
print([1,2,3,4][0:3]) # result is: [1, 2, 3]
+ 3
Yes, 10 is excluded. This slice will include elements 0 through to 9 and exclude element 10
+ 2
Inclusive = Include both range bounds.
Exclusive = Include range lower bound, but exclude upper bound.
+ 1
Yeah that's what I mean what does exclude means then can ya tell me🤔🤔🤔🤔🤔
- 1
Yeah I tested that bro