how to reverse a number in python

137

how to reverse a number in python -

num = 123456
print(str(num)[::-1])

Comments

Submit
0 Comments