input: Write a function to convert a given SQL query into a Python program that connects to a database and executes the query. The function should take the SQL query as input and return the results. If the query is executed successfully, the function should print the results.
  
  assert execute_sql('SELECT * FROM orders WHERE YEAR(order_date) = 2020')==None
  assert execute_sql('SELECT * FROM products WHERE quantity < 10')==None
  assert execute_sql('SELECT name, address FROM customers WHERE city = \'New York\'')==None
output: def execute_sql(query):
      import sqlite3
      conn = sqlite3.connect(':memory:')
      cursor = conn.cursor()
      cursor.execute(query)
      results = cursor.fetchall()
      conn.close()
      if results:
          for row in results:
              print(row)
      return None