I want to create a dictionary where the keys are string and the values are the lists. Initially, all lists are empty. Then I want to append an int to a specific list using "append()." The result: the int is appended to ALL list in my dictionary.
d = ['a', 'b', 'c']
my_d = dict.fromkeys(d, [])
my_d['a'].append(4)
print(my_d)
{'a': [4], 'b': [4], 'c': [4]}
I want it to be :
{'a': [4], 'b': [], 'c': []}
since I appended 4 to my_d['a'] only