PyNotes
261 subscribers
125 photos
7 videos
1 file
60 links
**Code is communication**
admin: @Xojarbu
https://t.me/solutions_py for problem solutions
Download Telegram
#class #constructor
In python every class has a constructor, but its not required to explicitly define it.

the __init__() method is a constructor and is always called when an object is created.

There are two types of constructors:
Default constructor - a simple constructor which doesn’t accept any arguments.

Parameterized constructor - a constructor with arguments.

Source1, Source2