how to create dict key with list default -2

39

dict_x = {}

...

dict_x.setdefault(key, []).append(value)

Comments

Submit
0 Comments