I'm not sure if this is what you want, but using append
, your code expects the subid
be a list. If you do this, you can change this:
topid = { "ida" : "ida", "idb" : "idb", "idc" : "idc", "subid" : {} }
:
topid = { "ida" : "ida", "idb" : "idb", "idc" : "idc", "subid" : [] }
Note that subid
now an empty list, not a dictionary.
source share