Your First Class
Beginner
About Python →
class, __init__, self and methods. 6 quick lessons that build on Intro to Python.
0 / 6 lessons complete
Start Lesson 1
Open the Python sandbox ↗
1
What Is a Class?
Write a blueprint and build an object from it.
2
The __init__ Method
Give each object its own starting values.
3
Two Dogs
Build two objects from one blueprint.
4
Methods That Use self
Let a method use the object's own values.
5
Objects That Remember
Change an object's values; it remembers!
6
A Team of Objects
Combine classes with lists and loops.