input: Write a function to create a web API using Python and Flask that returns the current date and time in the format "YYYY-MM-DD HH:MM:SS". If the function is run, it should start the Flask server and make the API available.
  
  from flask import Flask
  import datetime
  
  app = Flask(__name__)
  
  @app.route('/datetime')
  def get_datetime():
      return datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
  
  assert get_datetime()=="2023-01-01 12:34:56"
  assert get_datetime()=="2023-02-15 23:59:59"
  assert get_datetime()=="2023-10-31 00:00:00"
  assert get_datetime()=="2023-12-24 18:00:00"
  assert get_datetime()=="2023-04-01 01:10:20"
output: 
  def get_datetime():
      return datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
  