Torch.Tensor
import torch
A = torch.tensor([[[104.0070]],
[[116.6688]],
[[122.6789]]])
#(3,1,1)
print('--------this is the first output')
print(A[:,:,-1])
'''
tensor([[104.0070],
[116.6688],
[122.6789]])
'''
print('--------this is the second output')
print(A[:,:,:-1])
'''
tensor([], size=(3, 1, 0))
'''
#A[:,:,::-1] BUG:::: ValueError: negative step not yet supported
B = torch.tensor([[104.0070],
[116.6688],
[122.6789]])
#namely, B=A[:,:,-1]
print(B[:,-1]) #tensor([104.0070, 116.6688, 122.6789])
a = [1,2,3,4]
print(a[:-1])
#[1, 2, 3]
print(a[::-1])
#[4, 3, 2, 1]



