Rather simple question. Say I have a list like:
a = [3, 4, 54, 8, 96, 2]
Can I use slicing to leave out an element around the middle of the list to produce something like this?
a[some_slicing]
[3, 4, 8, 96, 2]
were the element 54
was left out. I would've guessed this would do the trick:
a[:2:]
but the result is not what I expected:
[3, 4]
a1, a2, a3, a4, a5 = a[:2:]
(which of course does not work)