Other than using a loop, is there a method to take a segment from a list.
For example, if I had the list:
l = [1,2,3,4,5,6,7,8,9,0]
and I wanted to take a segment from the 3rd item to the 5th I would end up with...
segment = [4,5,6]
I know this can be done with a loop but I was wondering if there was a more "pythonic" aproach?