bklukaczewski
5/9/2016 - 12:11 PM

slicing in python examples

slicing in python examples

# example 1
# show every 10th element in list
>>> l = range(165)  # range creates a list
>>> l[0::10]
[0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160]