Basically I have a dictionary that uses a tuple as a key. I want to utilize the get() function so that I can assign a default value if the key does not exist in the dictionary. However, I get a TypeError: get() takes no keyword arguments error when I attempt to do this. Here is my code that raises an exception:
dict = {('a', 'b'): 10}
dict.get(('a', 'b'), default = 0)
How can I accomplish what I am trying to do?