I know there are similar questions to this one asking for only the first element and the last one, but I think this question is different:
Given a list a=[1,2,3,4,5,6,7,8,9,10], is it possible to write in an elegant form a way to get the first element and the last three (or n) ones in one line in a way such that it returns [8,9,10,1]?
I attempted using a[7:-1], but since it understands as if they were inverted indices, it doesn't work.
I also know it's possible just to do a[len(a)-n:]+[a[0]], but I want to know if there is a 'brackets' way.