+ 1

Can anyone help me with pig latin question? Am not able to paas test case 3 and 5 help me by telling mistake in my code......

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

26th May 2022, 3:18 PM
Avi
Avi - avatar
3 odpowiedzi
+ 1
e = words.translate({ord(ah):None}) this replaces all instances of ah with none, not only at first place. Instead use e = words[1:]
26th May 2022, 3:37 PM
Jayakrishna 🇮🇳
+ 3
Thanks a lot both of you🙂✌️
26th May 2022, 3:45 PM
Avi
Avi - avatar
+ 1
translate() will translate all occurances of the letter, not only the one in the 1st place example: lolly -> ollylay but your current code does: lolly -> oylay
26th May 2022, 3:38 PM
Lisa
Lisa - avatar