Python Program to Reverse a Number Using String Slicing
# Reverse a Number in Python Using String Slicing # we are taking a number from user as input # entered value will be converted to int from string num = int(input("Enter the number:")) print(str(num)[::-1])
Output:
Enter the number:123456
654321