Apr-16-2020, 01:17 PM
num = 4576
num_p = 0
num_t = num
while num != 0:
num_p = num_p * 10 + num % 10
num = num / 10
print(num, num_p)I'd like to get the reverse order of num, and put it to the num_p.but the answer is 4576, inf.
What is wrong with my code?
