syntax template
A pattern showing the general shape of a statement, with placeholder parts to be replaced by real code.
In more detail
For example def functionName(): followed by an indented statement block. The course uses templates to show which parts are fixed words and punctuation and which you fill in.
Related terms
- def — The Python keyword that starts a function definition: def, the name, parameters in parentheses, a colon, then an indented body.
- compound statement — A statement such as if, for, while, def, class, try or with that has a heading ending in a colon and an indented block beneath it.
Taught in
- Defining Your First Function — Hands-on Python: Complete Video Course & Book