Hi, here’s your problem today. This problem was recently asked by Amazon:
Given an integer, reverse the digits. Do not convert the integer into a string and reverse it.
Here’s some examples and some starter code.
def reverse_integer(num):
Fill this in.
print(reverse_integer(135))
531
print(reverse_integer(-321))