+ 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
7 Answers
+ 3
bijoy mharana
Why loop if you can just do this:
wd = input ()
if wd == wd[::-1]:
print("yes")
else:
print("no")
+ 1
Oh thansk
0
Plz hslp
0
Oh I dint know that u could do that
0
But Why does my loop just reprint the same characters?
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