source_list[::10] is the most obvious, but this doesn't work for any iterable and is not memory efficient for large lists.
itertools.islice(source_sequence, 0, None, 10) works for any iterable and is memery efficientmemory-efficient, but probably is not the fastest solution for large list and big step.
(source_list[i] for i in xrange(0, len(source_list), 10))
source_list[::10] is the most obvious, but this doesn't work for any iterable and is not memory efficient for large lists.
itertools.islice(source_sequence, 0, None, 10) works for any iterable and is memery efficient, but probably is not the fastest solution for large list and big step.
(source_list[i] for i in xrange(0, len(source_list), 10))
source_list[::10] is the most obvious, but this doesn't work for any iterable and is not memory efficient for large lists.
itertools.islice(source_sequence, 0, None, 10) works for any iterable and is memory-efficient, but probably is not the fastest solution for large list and big step.
(source_list[i] for i in xrange(0, len(source_list), 10))
source_list[0source_list[::10] is the most obvious, but this doesn't work for any iterable and is not memory efficient for large lists.
itertools.islice(source_sequence, 0, None, 10) works for any iterable and is memery efficient, but probably is not the fastest solution for large list and big step.
(source_list[i] for i in xrange(0, len(source_list), 10))
source_list[0::10] is the most obvious, but this doesn't work for any iterable and is not memory efficient for large lists.
itertools.islice(source_sequence, 0, None, 10) works for any iterable and is memery efficient, but probably is not the fastest solution for large list and big step.
(source_list[i] for i in xrange(0, len(source_list), 10))
source_list[::10] is the most obvious, but this doesn't work for any iterable and is not memory efficient for large lists.
itertools.islice(source_sequence, 0, None, 10) works for any iterable and is memery efficient, but probably is not the fastest solution for large list and big step.
(source_list[i] for i in xrange(0, len(source_list), 10))
source_list[0::10] is the most obvious, but this doesn't work for any iterable and is not memory efficient for large lists.
itertools.islice(source_sequence, 0, None, 10) works for any iterable and is memery efficient, but probably is not the fastest solution for large list and big step.
(source_list[i] for ini in xrange(0, len(source_list), 10))
source_list[0::10] is the most obvious, but this doesn't work for any iterable and is not memory efficient for large lists.
itertools.islice(source_sequence, 0, None, 10) works for any iterable and is memery efficient, but probably is not the fastest solution for large list and big step.
(source_list[i] for in in xrange(0, len(source_list), 10))
source_list[0::10] is the most obvious, but this doesn't work for any iterable and is not memory efficient for large lists.
itertools.islice(source_sequence, 0, None, 10) works for any iterable and is memery efficient, but probably is not the fastest solution for large list and big step.
(source_list[i] for i in xrange(0, len(source_list), 10))