Logo

Python Classes

Intro to OOP in Python

Learning Outcomes

  • What classes are
  • The difference between a class and a class instance
  • What self means and how it's used
  • The __init__() method
  • Class and instance variables
  • Classmethods vs. staticmethods

Theory

Like we've done before, we're going to watch Corey Schafer's Python OOP 6-part series. In this lesson, you'll be introduced to classes and their basic functionality. Watch the following three videos:

Knowledge Check

  • Explain what classes are and how they are used
  • What does self mean and where is it used?
  • What does __init__() method do?
  • How to create class vs instance variables, and how to access each?
Contribute to this lesson