template
A piece of text with marked blanks, such as {name}, that a program fills in to produce a finished document.
In more detail
Keeping a web page template in its own file separates the design from the code: the program reads the file, calls format with the values, and prints or saves the result. The mad lib story is also a template.
Related terms
- format method — The string method that returns a copy of a string with each {} replacement field filled in from its arguments.
- replacement field — A pair of braces {} in a format string marking where a value will be inserted.
- HTML — The markup language that describes the structure and meaning of a web page with elements such as <button>, <input> and <h2>.
Taught in
- Your Python Folder And A First Program — Hands-on Python: Complete Video Course & Book
- A Sample Program, Explained — Hands-on Python: Complete Video Course & Book
- Defining Your First Function — Hands-on Python: Complete Video Course & Book
- Composing Web Pages In Python — Hands-on Python: Complete Video Course & Book
- CGI: Dynamic Web Pages — Hands-on Python: Complete Video Course & Book
- Chapter Four In One Sitting — Hands-on Python: Complete Video Course & Book