I have a dictionary in a text file in exact format given bellow,
{'one': 'a', 'two': 'b', 'three': 'c'}
I want to take that dictionary in a variable say dict1. My program generates new key value pairs, if the new generated key is is not present in dict1 then I want to add this new key in dict1. finally I want to update txt file with this updated dictionary.
I know how to add key value pairs to a dict but I am not able to read that dictionary from txt file into a dictionary type of variable.
can anybody help plz ?