Guest User

Untitled

a guest
Jun 18th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. def nth(x, n, digits=1, system=10):
  2. if n < 0:
  3. return int(x / (system ** (abs(n) - 1))) % system ** digits
  4. else:
  5. return int(
  6. x / (system ** int(mlog.log(system)(x) - n))
  7. ) % system ** digits
Add Comment
Please, Sign In to add comment