4 Respostas
+ 8
Because -0 is equal to 0? So there is no movement or shifting beyond its current place, assuming that Python even lets you use -0. Think of it as an offset instead.
-1 is equiv to starting at the 0 position and going backward by one place, which loops it around to the end of the list.
+ 5
This way u can use a list like a circle:
The left neighbour of 3 is 2
and the left neighbour of 0 is -1
its magic... right?😉
+ 2
print(True) if -0 == 0 else print(False)
https://code.sololearn.com/c4iJXaYP3rML/?ref=app
0
Fata1 Err0r thanks!