input: Write a function to convert a SQL query into a Python program. The function should take a SQL query as input, execute it using pyodbc, and print the results. If the SQL query contains a WHERE clause, the function should handle parameterized queries to prevent SQL injection.
  
  assert convert_sql_to_python("SELECT * FROM orders WHERE YEAR(order_date) = 2020") == \
  """import datetime, pyodbc
  
  # Establish a connection to the database
  conn = pyodbc.connect("<connection details>")
  cursor = conn.cursor()
  
  # Get the year of the order date
  sql = "SELECT * FROM orders"
  query_date = datetime.date.today().year
  where_clause = "WHERE YEAR(order_date) = ?"
  
  # Execute the query
  cursor.execute(sql + " " + where_clause, query_date)
  results = cursor.fetchall()
  
  # Output the results
  for result in results:
      print(result)
  """
  
  assert convert_sql_to_python("SELECT * FROM customers") == \
  """import pyodbc
  
  # Establish a connection to the database
  conn = pyodbc.connect("<connection details>")
  cursor = conn.cursor()
  
  # Execute the query
  sql = "SELECT * FROM customers"
  cursor.execute(sql)
  results = cursor.fetchall()
  
  # Output the results
  for result in results:
      print(result)
  """
output: 
  import pyodbc
  
  # Establish a connection to the database
  conn = pyodbc.connect("<connection details>")
  cursor = conn.cursor()
  
  # Check if the SQL query contains a WHERE clause
  if "WHERE" in sql_query:
      sql_parts = sql_query.split("WHERE")
      sql = sql_parts[0].strip()
      where_clause = "WHERE" + sql_parts[1].strip()
      
      # Extract the parameter from the WHERE clause
      param_start = where_clause.find("=") + 1
      param_value = where_clause[param_start:].strip()
      
      # Execute the parameterized query
      cursor.execute(sql + " " + where_clause.replace(param_value, "?"), param_value)
  else:
      # Execute the query without parameters
      sql = sql_query
      cursor.execute(sql)
  
  results = cursor.fetchall()
  
  # Output the results
  for result in results:
      print(result)
  