New course! Every coder should learn Generative AI!
Try a free lesson+ 3
Python lists work like this:
foo[start:stop:step]
You are negative stepping to the left of your first index. If you change it to a positive 1 it works
foo = [1,2,3]
bar = foo[-3:-1:1]
# why bar is empty
print(bar,end= " --> I don't know why i'm empty")
#[] ---> I don't know why i'm empty