Python Version 3.6.8
import xml.etree.cElementTree as ET
Following is the code to generate XML file, XML file generation code is working fine. I need to write some values from variables. Variables are i, height and width.
frame = ET.SubElement(root, "frame", number="{i}")
objectlist = ET.SubElement(frame, "objectlist")
object = ET.SubElement(objectlist, "object", id="1")
ET.SubElement(object, "box", h="{height}", w="{width}")
How can I pass the variables in the given code? (First Line of Code and fourth line of code)