input: Write a function that creates a web API using Flask in Python to return the current date and time in the format "YYYY-MM-DD HH:MM:SS". The API should have a route `/datetime` that when accessed returns the current date and time.
  assert app.route('/datetime')=='2023-10-05 14:30:45'
  assert app.route('/datetime')=='2023-10-05 14:31:01'
  assert app.route('/datetime')=='2023-10-05 14:31:12'
  assert app.route('/datetime')=='2023-10-05 14:31:23'
output: 
  from flask import Flask
  from datetime import datetime
  
  app = Flask(__name__)
  
  @app.route('/datetime')
  def get_datetime():
      now = datetime.now()
      return now.strftime("%Y-%m-%d %H:%M:%S")
  