Open this example in the interactive library
Source code
crop = slice(1, -1)
print(['header', 'first', 'second', 'footer'][crop])Sample output
['first', 'second']

Open this example in the interactive library
crop = slice(1, -1)
print(['header', 'first', 'second', 'footer'][crop])['first', 'second']