There are several ways to fix this, here's a couple of ways I thought of:
Here's a oneliner for line 66
Here's a oneliner for line 66
'price': None if item < titles else prices[item]if you want a function:
def get(list, index, default=None): try: return list[index] except IndexError: return default