Series overview

Python Bakery

This lesson introduces dataclasses, created with the dataclass decorator and the class keyword to bundle several fields into a single new type. Students learn to define a dataclass’s fields with their types, create instances by calling it like a function, and access field values using a period.