Difficulties in using replit

Hi,
I would like to start creating repl’s on replit but I’m struggling. Everytime I create a new repl this code appears and I have no idea what it means:
'from flask import Flask

app = Flask(‘app’)

@app.route(‘/’)
def hello_world():
return ‘Hello, World!’

app.run(host=‘0.0.0.0’, port=8080)’

When I try to write code outside it or inside it I just get error messages. I have tried YouTube tutorials but their repl’s never have this code. If anyone could explain to me how I can actually start writing code that would be much appreciated. (I know we use pre-made repl’s for the projects but I want to experiment outside of this)

You should be able to delete all the starting code to just write plain Python code.


Flask is a web framework

https://flask.palletsprojects.com/

Thank you for your help. I thought I’d already tried that for some reason but obviously didn’t smh. Sorry to waste your time on such a simple solution.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.