The Question is like Write a Python program that will ask the user to input a string (containing exactly one word).
user_input = input('Please Enter a word')
for line in range(len(user_input)):
print(user_input[0: line+1])
OUTPUT: Please Enter a word DAD MOM. D DA DAD DAD DAD M DAD MO DAD MOM
(Here, i could give two words in input, so how to restrict it to one word)