Create a REST API using Python Flask that returns a JSON list of numbers from 1 to 10 when a get request is made to the endpoint /list.
Not applicable
from flask import Flask, jsonify

app = Flask(__name__)

@app.route("/list", methods=["GET"])
def get_list():
 numbers = list(range(1, 11))
 return jsonify(numbers)

app.run()