input: Write a function to generate an XML document using Python that includes a list of items provided as input. The function should return an XML document with a root element named 'data', and each item in the list should be a sub-element named 'item' under the root.
  assert generate_xml(['Item1', 'Item2', 'Item3'])=='<data><item>Item1</item><item>Item2</item><item>Item3</item></data>'
  assert generate_xml(['One', 'Two', 'Three'])=='<data><item>One</item><item>Two</item><item>Three</item></data>'
  assert generate_xml(['A', 'B', 'C'])=='<data><item>A</item><item>B</item><item>C</item></data>'
  assert generate_xml([])=='<data></data>'
  assert generate_xml(['Single'])=='<data><item>Single</item></data>'
output: def generate_xml(items):
      xml_content = '<data>'
      for item in items:
          xml_content += f'<item>{item}</item>'
      xml_content += '</data>'
      return xml_content