stock = {'football': 4, 'boardgame': 10, 'leggos': 100, 'doll': 5}
def fillable(stock, merch, n):
return stock.get(merch, 0) >= n
print(fillable(stock, 'leggos', 10))
The result in codewars:
Traceback: in in fillable TypeError: unorderable types: NoneType() >= int()