What's wrong in this code? | SoloLearn: Learn to code for FREE!


What's wrong in this code?


10/26/2019 9:40:05 AM


3 Answers

New Answer


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.


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)


Thank you so much guys...