2020年12月31日星期四

Could someone give me some explanation on the syntax for classes?

I'm currently learning classes, and I get that the format goes like

def class1:   def __init__(self):  

but what is init and why do we need two surrounding underscores around it?

https://stackoverflow.com/questions/65526986/could-someone-give-me-some-explanation-on-the-syntax-for-classes January 01, 2021 at 10:48AM

没有评论:

发表评论