Create list of empty lists having name

I am pretty new to python and looking for how to create a list of empty lists having names more efficiently than presented below I would like to have some names to the lists. flattenlist_x1 = [] flattenlist_x2 = [] flattenlist_x3 = [] flattenlist_x4 = [] flattenlist_x5 = [] flattenlist_x6 = [] flattenlist_x7 = []… Read More Create list of empty lists having name

Empty key value in JSON

I’m trying to parse a string list to JSON. When the list has items, the return is: {‘body’: ‘{"A":"a", "B": ["abc"], "C":"c"}}’ Using json.dumps and then json.loads works out. But when the list is empty, the return is: {‘body’: ‘{"A":"a", "B": , "C": "c"}}’ I get a JSONDecodeError: Expecting value and can’t access the B… Read More Empty key value in JSON