Computer Science, asked by ferozshaik786256, 1 month ago

Given a string, say "HELLO”. Write a c
program to as: H HE HEL HELL HELLO​

Answers

Answered by riyaasati
0

Answer:

Given a string, say "HELLO”. Write a c

program to as: H HE HEL HELL HELLO

Answered by Anonymous
5

{\huge{\blue{\mathcal{ANSWER}}}}

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))

{\huge{\pink{\mathfrak{Paro☘}}}}</p><p>

Similar questions