how to add and update items to a dictionary in Python