I try to create a Web Server using Flask and I want to add an infinite loop just like this:
from flask import Flask
app = Flask(__name__)
@app.route("/")
def main():
return "This is my website".
if __name__ == "__main__":
app.run()
while True:
print("Hello World")
but when I run the program, string "Hello World" is never printed, is there a solution for this ? Thanks