文件的末尾添加元素。比如说,元素名是path,它是一个字符串,那么我想要的输出应该是,... existing data in json ...代码,它确实向json文件添加了元素,但是它重新安排了文件的内容。())jsonData['path'] = pathValueString
with open
我有一个包含大量代码和列表的python文件。我需要在特定列表中添加列。 我的问题是-如何从.py文件加载特定列表?还有,如何将元素添加到特定列表中?("d:\\python\\monitor.py", "r") as infile:
#here I need to load a "dev_personal_files" list and append additional element