you can try in this way
a=input('input:')
while a.strip()!='':
b=a.split()
ans=""
while len(b) >0 :
word=b[0][::-1]
ans+=word+" "
b.pop(0)
print ans
a=input('input:')
#output i ma hsejar !aloH
0
solved How can i use a while loop on this program?