LearnPy Hub
← Iterators & Generators problems
Medium

Cycle Through Colours

Read colours on one line and n. Give items 1..n a colour each by cycling through the colours with itertools.cycle, and print i colour for each.

Input

Colours, then n.

Output

n lines.

Sample 1

Input
red green
5
Output
1 red
2 green
3 red
4 green
5 red

Sample 2

Input
blue
3
Output
1 blue
2 blue
3 blue
solution.py
Output appears here
Cycle Through Colours · Python practice problem · LearnPy Hub