It's fairly simple to articulate problem, but I'm not 100% sure that I have my lingo right. Nonetheless, conceptually "cherry picking" is suitable to describe the slice I have in mind. This is because I simply want to access (cherry pick from all elements) two distant elements of a list. I tried this:
my_list[2,7]
So I was expecting it to return only 2 elements, but instead I got the error:
list indices must be integers, not tuples.
I searched this error, but I found it was actually a very general error and none of the problems that instigated this error were actually for my type of problem.
I suppose I could extract the elements 1 at a time and then merge them, but my gut tells me there is a more "pythonic" way about this.
Also a slightly more complicated form of this problem I ran into was building a new list from an existing list of lists:
new_list = []
for i in range(len(my_list)):
new_list.append(my_list[i][2,7])