how to update element in dictionary in python