The Python Oracle

How to hash a string into 8 digits?

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Over Ancient Waters Looping

--

Chapters
00:00 Question
00:20 Accepted answer (Score 244)
00:48 Answer 2 (Score 159)
02:31 Answer 3 (Score 11)
03:01 Answer 4 (Score 5)
03:30 Thank you

--

Full question
https://stackoverflow.com/questions/1600...

Accepted answer links:
[hashlib]: http://docs.python.org/library/hashlib.h...
[hash]: http://docs.python.org/library/functions...

Answer 4 links:
[shake.hexdigest(4)]: https://docs.python.org/3/library/hashli...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #arrays #algorithm #random #hash

#avk47