LearnPy Hub
← Iterators & Generators problems
Easy

next() by Hand

Read words. Make an iterator with iter() and print the first two words using next(), then the rest with a loop on one line.

Input

One line of at least 3 words.

Output

Three lines.

Sample 1

Input
a b c d
Output
a
b
c d

Sample 2

Input
one two three
Output
one
two
three
solution.py
Output appears here
next() by Hand · Python practice problem · LearnPy Hub