+ 1

Why isn't this work8ng https://code.sololearn.com/cakGitH7K5u7/?ref=app

Why isn't this work8ng https://code.sololearn.com/cakGitH7K5u7/?ref=app

14th Feb 2022, 8:24 AM
bijoy mharana
7 odpowiedzi
+ 3
bijoy mharana Why loop if you can just do this: wd = input () if wd == wd[::-1]: print("yes") else: print("no")
14th Feb 2022, 8:40 AM
A͢J
A͢J - avatar
+ 1
Oh thansk
14th Feb 2022, 8:50 AM
bijoy mharana
0
Plz hslp
14th Feb 2022, 8:39 AM
bijoy mharana
0
Oh I dint know that u could do that
14th Feb 2022, 8:41 AM
bijoy mharana
0
But Why does my loop just reprint the same characters?
14th Feb 2022, 8:41 AM
bijoy mharana
0
bijoy mharana Then change tt = tt + wd[t] To tt = wd[t] + tt ------- def reverse(l, wd): tt = "" while l > 0: t = -1 * l tt = wd[t] + tt l = l - 1 return tt
14th Feb 2022, 8:43 AM
A͢J
A͢J - avatar
14th Feb 2022, 9:33 AM
HungryTradie
HungryTradie - avatar