Skip to content

Instantly share code, notes, and snippets.

@ssanin82
Created January 30, 2015 06:17
Show Gist options
  • Save ssanin82/316642d0848474937a86 to your computer and use it in GitHub Desktop.
Save ssanin82/316642d0848474937a86 to your computer and use it in GitHub Desktop.
import math
def rotate(n):
digs = int(math.log10(n))
return (10 ** digs) * (n % 10) + n // 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment