How do i create a class in python?
-
In article https://www.lightnetics.com/post/9836 you saw how to use classes.
This article shows you how to create a simple class. Only the class is shown to demonstrate what a class is.
A Class called Cake with one method.
class Cake(object): def __init__(self, type, base): self.type = type self.base = base
© Lightnetics 2024