Simplify with itertools.islice().