Created
June 27, 2014 18:04
-
-
Save jamescw/6ae15d64459ddd2a451a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
number = '07045656789' | |
def hash_to_digits(num, length=10): | |
return abs(hash(num)) % (10 ** length) | |
hash = hash_to_digits(number) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment