Python Array Get Function Hashmap Complexity