I am an absolute beginner to use flask
I am trying to run this code to generate an api that return hello world text I run it on jupyter notebook
from flask import Flask
app = Flask(__name__)
@app.route('/result')
def index():
return 'Hello, World!'
if __name__ == '__main__':
app.run(debug= False , host= 'localhost',port=2000)
The problem is when I run on any port number it runs fine the first time I tried to stop the cell using ctrl + c but it doesn't stop so I stopped it using interput kernel button but when I run the code again on the same port number it does not work any more and give me loading page forever but when I change the port number it works fine again can some explain why does it happen