input: 
  from flask import Flask
  import datetime
  
  
  def get_current_datetime():
      """
      Create a web API using Flask to return the current date and time in the format "YYYY-MM-DD HH:MM:SS".
      >>> from flask import Flask
      >>> from datetime import datetime
      >>> app = Flask(__name__)
      >>> @app.route('/datetime')
      ... def get_datetime():
      ...     return datetime.now().strftime("%Y-%m-%d %H:%M:%S")
      ...
      >>> app.test_client().get('/datetime').data.decode('utf-8')
      '2023-10-31 12:34:56'
      """
      app = Flask(__name__)
  
      @app.route('/datetime')
      def get_datetime():
          return datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
  
      if __name__ == '__main__':
          app.run()
  
output:     return app