Hash Function For Hash Table Python