Question : append to a list without intializing
Answered by : cheerful-corncrake-3i7rgtejm0rx
from collections import defaultdict
a = defaultdict(list)
Source : https://stackoverflow.com/questions/28709345/how-to-append-to-python-list-in-a-dict-without-having-to-initialize-the-list | Last Update : Sat, 26 Mar 22
Question : append to a list without intializing
Answered by : cheerful-corncrake-3i7rgtejm0rx
a['name'].append('el1')
Source : https://stackoverflow.com/questions/28709345/how-to-append-to-python-list-in-a-dict-without-having-to-initialize-the-list | Last Update : Sat, 26 Mar 22