0
Pig Latin: My soln keeps failing 2/5 test cases. Please help me out. Thanks so much.
6 Antworten
+ 1
l=list(input().split())
ans=""
for i in l:
ans+=(i[1:]+i[0]+"ay")
ans+=" "
print(ans)
0
I am not finding any wrong output on giving any input
I think the wrong answer may be coming due to some extra spaces given by the system
To rectify it try replacing
sentence = input()
With
sentence = input().rstrip()
0
No success.
0
I am clueless then May be I will able to help if you send the link to the problem
0
This passes all the test cases