+ 2
Is there any short way to convert iteration to list or string sentence?
txt=input() word=txt.split() for x in word: P=x[:1]+"ay" x=x.replace(x[:1],"") x+=P
1 Answer
+ 4
print(*[ x[1:]+x[:1]+"ay" for x in input().split()] )
txt=input() word=txt.split() for x in word: P=x[:1]+"ay" x=x.replace(x[:1],"") x+=P