I know I can test if set1 is a subset of set2 with:
{\'a\',\'b\',\'c\'} <= {\'a\',\'b\',\'c\',\'d\',\'e\'} # True
But the following is a
Combining previous answers gives a solution which is as clean and fast as possible:
def issubset(X, Y):
return all(v <= Y[k] for k, v in X.items())