, , itertools.islice:
import itertools
array = 'for loop in python'.split()
for x in itertools.islice(array, 2, None):
print x
because the slice statement creates a completely new list, which means overhead if you just want to iterate over it.
source
share