Given a string, say "HELLO”. Write a c
program to as: H HE HEL HELL HELLO
Answers
Answered by
0
Answer:
Given a string, say "HELLO”. Write a c
program to as: H HE HEL HELL HELLO
Answered by
5
Here is Your Coding :-
def string_separate(s):
s1 = s.split(" ")
n = 0
new_str = ''
for k in s1:
for i in range(len(k)):
x = k[n:i+1]
new_str+=x + ","
return new_str
User_string = input("Type Something... ")
print(string_separate(User_string))
Similar questions