I want the final number as returned by the function, the following code is running, but not returning the correct value, the correct value is printed by the print statement above return satatement, how can return it ?? the correct answer is 22. but 13 is too printed.
def palindrome(num):
num = num+1
num = str(num)
if num[::-1]!=num:
palindrome(int(num))
else:
print(int(num))
return int(num)
palindrome(12)
>RESULT---
22
13