input: Write a function to construct an XML document using Python which contains a list of items. The function should create a root element named 'data' and sub elements named 'item' for each item in the list. After constructing the XML structure, the function should write the XML Tree to a file named 'data.xml'.
  assert construct_xml(['Item1', 'Item2', 'Item3'])==None
  assert construct_xml(['Item1'])==None
  assert construct_xml([])==None
output: def construct_xml(items):
      from xml.etree.ElementTree import Element, SubElement, ElementTree
  
      root = Element('data')
      for item in items:
          item_elem = SubElement(root, 'item')
          item_elem.text = item
  
      tree = ElementTree(root)
      tree.write('data.xml', encoding='utf-8', xml_declaration=True)