I created a dictionary with 2 keys that assign a single dictionary value, for example:
my_dict[x, y] = ...
my_dict[a, u] = ...
Now, how would I use the method has_key()for two key variables, x and y, such as:
if my_dict.has_key(x,y) == True:
Do Something
else:
Do something else
d is a matrix that uses the pdict values ββthat I call from the variable f and g, but all you need to know is that they are the names of the variables x, y, which are used as key values ββin pdict.
source
share