with open("file_adress"+''fileName'', 'w') as f:
(whatYouWantToSTore, f, indent=2, separators=(',', ': '))
这里indent是缩进的意思一般写为4 或者2
separators 是( ‘元素之间用逗号隔开’ , ‘key和内容之间’ 用冒号隔开)
这里是 ‘逗号’ , ‘冒号’ 中间的逗号不带引号
with open("file_adress"+''fileName'', 'w') as f:
(whatYouWantToSTore, f, indent=2, separators=(',', ': '))
这里indent是缩进的意思一般写为4 或者2
separators 是( ‘元素之间用逗号隔开’ , ‘key和内容之间’ 用冒号隔开)
这里是 ‘逗号’ , ‘冒号’ 中间的逗号不带引号