num = 1234567 num1 = int(str(num)[::-1]) print('num: {}, num1: {}'.format(num, num1))1st line you can replace this with your input statement.
2nd line - 1st convert num to a string str(num)
then reverse the string with slice operation [::-1]
next re-convert result back to int int()
result:
Output:num: 1234567, num1: 7654321