Python Quest

Track 15 · Lesson 5 of 11

Generating reports

Produce aligned text, Markdown and HTML reports from data with f-strings and string.Template, escape HTML correctly, and package a report as an email message.

About 55 minIntermediate4 exercises

You will be able to

  • Align columns of a text report with f-string format specifications
  • Fill reusable templates with string.Template and handle missing values
  • Build HTML tables safely with html.escape
  • Build an email message with an attachment using email.message.EmailMessage

Included with a Formula Quest membership

It has 4 graded exercises with feedback, hints and solutions. Python Quest is included in Formula Quest memberships that cover Python; membership and billing are managed on Formula Quest.

View Formula Quest memberships

Tracks 1 and 2, the first lesson of every track, the playground and the dataset library are free.