0
Write a function intreverse(n) that takes as input a positive integer n and returns the integer obtained by reversing the digits
6 Answers
+ 4
Show us your attempts by providing what you have coded so far and we will help you.
+ 1
print(int(input())[::-1])
+ 1
Sousou function input nor the return value will be integers
+ 1
check this. right code.
print(int(str(input())[::-1]))
0
tip: datatype change and slicing/reverse
0
def rtl(num):
return num[::-1]
n=input()
print(int(rtl(n)))