LearnPy Hub
← Exceptions problems
Hard

Read Until the End

Read lines until there is no more input (catch EOFError). Print how many lines there were and the longest one.

Input

Any number of lines.

Output

Two lines.

Sample 1

Input
a
bbb
cc
Output
3
bbb

Sample 2

Input
single
Output
1
single
solution.py
Output appears here
Read Until the End · Python practice problem · LearnPy Hub