0

Pig Latin: My soln keeps failing 2/5 test cases. Please help me out. Thanks so much.

https://code.sololearn.com/c79ESS5vL2Lg/?ref=app

19th May 2020, 2:35 PM
Etuk Bartho
Etuk Bartho - avatar
6 Answers
+ 1
l=list(input().split()) ans="" for i in l: ans+=(i[1:]+i[0]+"ay") ans+=" " print(ans)
19th May 2020, 3:20 PM
Pulkit Kamboj
Pulkit Kamboj - avatar
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()
19th May 2020, 2:55 PM
Pulkit Kamboj
Pulkit Kamboj - avatar
0
No success.
19th May 2020, 3:02 PM
Etuk Bartho
Etuk Bartho - avatar
0
I am clueless then May be I will able to help if you send the link to the problem
19th May 2020, 3:03 PM
Pulkit Kamboj
Pulkit Kamboj - avatar
19th May 2020, 3:08 PM
Etuk Bartho
Etuk Bartho - avatar
0
This passes all the test cases
19th May 2020, 3:20 PM
Pulkit Kamboj
Pulkit Kamboj - avatar