cut list python code example
Example 1: python array slice
>>> a[1:4]
[2, 3, 4]
Example 2: cut a section out of a list python
>>> [1,2,3,4,5,6,7,8][:5]
[1, 2, 3, 4, 5]
>>> [1,2,3][:5]
[1, 2, 3]
>>> x = [6,7,8,9,10,11,12]
>>> x[:5]
[6, 7, 8, 9, 10]