I wanted to code a program that changes the word order: Hello --> elloHay.The input is a string like " Hello World". However,it doesn't work. I am thankful for your help.
def pig_it(text):
a = text.split()
for i in range(len(a)):
a.map(i[0])
for i[0] in a:
t = i[:1]+ i[0] + 'ay'
a = " ".join(t)
return i