how to reverse a number in python

118

how to reverse a number in python -

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

Comments

Submit
0 Comments