input: Write a python function to parse an XML string and insert the data into an SQLite database table.
  assert parse_and_insert(xml_str) == [('John Doe', 32), ('Jane Doe', 30)]
  assert parse_and_insert('<root><person><name>Alice</name><age>25</age></person><person><name>Bob</name><age>22</age></person></root>') == [('Alice', 25), ('Bob', 22)]
  assert parse_and_insert('<root><person><name>Charlie</name><age>40</age></person></root>') == [('Charlie', 40)]
output: import sqlite3
  import xml.etree.ElementTree as ET
  
  def parse_and_insert(xml_str):
      # Parse the XML string
      root = ET.fromstring(xml_str)
      
      # Create a list to store person data
      persons = []
      
      # Extract data from XML
      for person in root.findall('person'):
          name = person.find('name').text
          age = int(person.find('age').text)
          persons.append((name, age))
      
      # Connect to SQLite database (in-memory database for this example)
      conn = sqlite3.connect(':memory:')
      cursor = conn.cursor()
      
      # Create table
      cursor.execute('''
      CREATE TABLE person (
          name TEXT,
          age INTEGER
      )
      ''')
      
      # Insert data into table
      cursor.executemany('INSERT INTO person (name, age) VALUES (?, ?)', persons)
      conn.commit()
      
      # Fetch data to verify
      cursor.execute('SELECT name, age FROM person')
      result = cursor.fetchall()
      
      # Close the connection
      conn.close()
      
      return result
  
  # Example XML string
  xml_str = '''
  <root>
      <person>
          <name>John Doe</name>
          <age>32</age>
      </person>
      <person>
          <name>Jane Doe</name>
          <age>30</age>
      </person>
  </root>
  '''