0

What's wrong in this code?

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

10/26/2019 9:40:05 AM

Hrishikesh Gaikwad

3 Answers

New Answer

+1

Your first issue is that you are comparing a string (rev) with an int (n) for equality. You'll need to change one to the other. An extra hint: your list slice is not doing what you think it is. I'd recommend you trying experimenting with list slices to figure out how they work properly.

+1

Here is your answer: https://code.sololearn.com/cCfyH1UCmP6n/?ref=app PS: Your if statement wasn't working as expected. I changed it so the code works. One of problems was comparing rev(str) and n(int)

+1

Thank you so much guys...