I just started to learn Python (from the book "We study programming on Python", author Paul Berry - problems with examples) and I can not understand why the example does not work. Here is the code itself:
from flask import Flask, render_template from vsearch import search4letters app = Flask(__name__) @app.route('/') def hello() -> str: return 'Hello world from Flask!' @app.route('/search4', methods=['POST']) def do_search() -> str: return str(search4letters('life, the universe, and everything', 'eiru,!') @app.route('/entry') def entry_page() -> 'html': return render_teamplate('entry.html', the_title='Welcome to search4 letters on the web!') app.run(debug=True) When you run Ctrl + F5 crashes on line 18 on the declaration of the method - the message - "Invalid syntax". This may be due to the fact that I'm doing this from work? Those. right there what or what? Thank.