AI engineering glossary · Python advanced
What is class?
Class: A blueprint that bundles data (attributes) and behaviour (methods) into a new kind of object. Code builds individual objects from it. It lets you model real things, such as a customer or a model wrapper, in one reusable, named unit.
Class: an example
class Loan: def __init__(self, amount): self.amount = amount loan = Loan(50000) creates a Loan object holding 50000 rupees.
Related terms
More Python advanced terms
- Class attribute
- Class method
- Closure
- collections module
- Composition
- conftest.py
- Constructor
- Context manager
Where you learn it
Class is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.