Python Array Get Function Hashmap Interview Question