Python Flask Basics Welcome to Flask View Args Through URL

Leo Marco Corpuz
Leo Marco Corpuz
18,975 Points

Flask argument challenge

What’s wrong with my code? It’s asking to give a default name argument of “Treehouse.”

flask_app.py
from flask import Flask

app = Flask(__name__)


@app.route('/<name>')
def hello(name ="Treehouse"):
     return 'Hello {}'.format(name)