suppose i have a list like this:
my_list = [0,1,2,3,4,5] # range(5)
i want to print this:
[2,1,0]
my python script is:
print(my_list[2:-1:-1])
but it prints an empty list!
is this a bug in python(2 and 3!)?
i wont use any trick like:
num_of_elems_i_want = 3
print(my_list[::-1][len(my_list) - num_of_elems_i_want:])
or third party modules..