How To Do Hash Function In Python