python - How to make a list as the default value for a dictionary? - Stack Overflow

PHOTO EMBED

Wed Mar 30 2022 13:49:23 GMT+0000 (Coordinated Universal Time)

Saved by @arielvol #python

dct[key].append(some_value)
content_copyCOPY

https://stackoverflow.com/questions/17755996/how-to-make-a-list-as-the-default-value-for-a-dictionary