Skip to main content

Python — 3 Deep Dive Part 4 Oop

Here, we create an object my_car from the Car class and access its attributes and methods.

def eat(self): print("Eating...")

def area(self): return 3.14 * self.radius ** 2 python 3 deep dive part 4 oop