Skip to content

Instantly share code, notes, and snippets.

@wiccy46
Created February 7, 2020 16:29
Show Gist options
  • Save wiccy46/3e66a3954935775a51ef9def230cbdfe to your computer and use it in GitHub Desktop.
Save wiccy46/3e66a3954935775a51ef9def230cbdfe to your computer and use it in GitHub Desktop.
[reverse_number] Reverse a number #python
n = 1234
rev=0
while(n>0):
dig=n%10
rev=rev*10+dig
n=n//10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment