LearnPy Hub
← Iterators & Generators problems
Easy

Repeat Generator

Write a generator repeat(word, n) that yields the word n times. Read a word and n and print the results on one line.

Input

A word, then n ≥ 1.

Output

One line.

Sample 1

Input
hi
3
Output
hi hi hi

Sample 2

Input
Python
1
Output
Python
solution.py
Output appears here
Repeat Generator · Python practice problem · LearnPy Hub