0
Why its output is an empty list.i expect 6 as output but it not come
5 odpowiedzi
+ 2
It is printing element with index -1 which is nothing
0
Interesting situation.
You are reading from -1 rightwards until you get to index 3.
Problem: -1 is already beyond 3, so your slice is over before it even started.
0
Can you explain more simply ?I didn't understand.