LearnPy Hub
← Introduction & print() problems
Hard

Name Triangle

Read a word and print it as a growing triangle: the first letter, then the first two letters, and so on until the whole word.

Input

One word.

Output

One line per prefix.

Sample 1

Input
cat
Output
c
ca
cat

Sample 2

Input
Python
Output
P
Py
Pyt
Pyth
Pytho
Python
solution.py
Output appears here
Hints
Name Triangle · Python practice problem · LearnPy Hub