i did it in while loop but couldn't do it in for loop
my code using while loop :
x=int(input("enter a number: "))
i=0
while(x>0):
remainder=x%10
i=(i*10)+remainder
x//=10
print(i)
question from:https://stackoverflow.com/questions/65640864/how-to-reverse-a-given-number-in-python-using-just-for-loop