LearnPy Hub
← Iterators & Generators problems
Medium

Slice an Endless Iterator

itertools.count(start, step) never ends. Read start, step and k and print the first k values using islice.

Input

Three integers on one line.

Output

One line.

Sample 1

Input
1 2 5
Output
1 3 5 7 9

Sample 2

Input
10 -3 4
Output
10 7 4 1
solution.py
Output appears here
Slice an Endless Iterator · Python practice problem · LearnPy Hub