Taking a list, l
, I would like to generate a new list of the elements at indexes:
0, 1, 2, 3, 2, 4, 5, 4, 6, 7, 6, 8, 9, 8, 0
I know it seems a bit strange, but it is necessary for a problem.
As for what I have tried, I am currently using the following, but was hoping that someone has something shorter and cleaner than this.
[*l[0:3], l[3], l[2], l[4], l[5], l[4], l[6], l7], l[6], l[8], l[9], l[8], l[0]]