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.

Level: beginnerTopic: Python advanced

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

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.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.