Is there a way to slice only the first and last item in a list?
For example; If this is my list:
>>> some_list [\'1\', \'B\', \'3\', \'D\',
Actually, I just figured it out:
In [20]: some_list[::len(some_list) - 1] Out[20]: ['1', 'F']