I have an automatically generated j son, I load it in the file (it is a list of dictionaries) and then I convert it to xml but how do I move the output to an "xml1.xml" file?
import json from dicttoxml import dicttoxml with open("json_generat.json") as f: data = json.load(f) xml1 = dicttoxml(data) I tried this but it doesn't fit me properly in xml file f = open("xml1.xml", "w") f.write(xml1.decode()) f.close()Output photo