Reputation: 57
I want to print the inputted string subsequently. My code:
text = input()
for i in text:
print(i)
Input:
ENG
My output:
E
N
G
The output I want:
E
EN
ENG
Upvotes: 0
Views: 64
Reputation: 647
This should solve your problem:
for i in range(len(text)):
print(text[:i+1])
Upvotes: 1