Welcome to Daniweb Python Forum newbies ;). Even somebody could think that you do half decent code.
Actually the idea of exercise was something like this (thoughts of solver):
"""Hmmm, this is not really slice at all beginning is same as end, of course it is this first element. Tsk, Tsk, Tony trying to mislead me: In Python indexes start with zero, so it is then the second element 1 in list as list: [1] (WRONG)
And then the second one, OK I know this -1 step, it is one of favourite tricks here in Daniweb, it reverse this sequence, hey what this means... OK, starting from second last until the end, of course, so these two last ones are reversed, and then put them in... where? Oh this is the first slice, I saw this in documentation, where they explain insert function. So we insert at begining [10, 9], no ups, [9, 8], but are they going as one element like append or inside like with extend? The left side is slice, so they go like extend. So it will be [9, 8,.. I mean [0, 9, 8, 1, 2, 3, 4, 5, 6, 7] , no it continues, we did not move them but copy them:
[0, 9, 8, 1, 2, 3, 4, 5, 6, 7, 8, 9] (WRONG)"""
But tsk, tsk Vegaseat: that is obfuscating, I was not doing that. Even maybe PEP8 does not disallow that. Counting even odd is job for computer not for reader of your code:
print(list(reversed(a)) if len('-----') & 1 else a)
Griswolf: The infuriating thing is that you must have exactly correct number of elements in right hand side, Python does not drop extra ones or evaluate only the needed ones lazyly or give you access to expected number of lhs sequence elements to slice rhs accordingly. This however works with both odd and even number of elements.
a= list(range(11))
>>> a[1::2], a[::2] = a[:len(a)//2], a[len(a)//2:]