Nowy kurs! Każdy programista powinien nauczyć się Generative AI!
Wypróbuj darmową lekcję0
What is the magic method for creating an instance?
What is the magic method for creating an instance?
4 odpowiedzi
+ 1
__init__ note the double underscores before and after it.
btw, u can go to the python course on this app to learn more
0
__init__
0
__init__
0
class Person:
def __init__(self, name):
self.name = name
sayHi(cls):
print("Hi")