Hash Function For Hash Table Implementation In Python