+ 3

Python class constructor

def__init__(self,name,rollno,m1,m2): Plz explain what is constructor in easy way What does constructor do? Why we use it?

12th Jan 2023, 8:35 AM
AruN
AruN - avatar
6 Answers
+ 2
It's a function that will automatically execute when you call a class and pass arguments to it
12th Jan 2023, 8:58 AM
Lamron
Lamron - avatar
+ 1
What are you doing?
13th Jan 2023, 5:08 PM
Osmany Baluta
Osmany Baluta - avatar
+ 1
Studying
13th Jan 2023, 5:16 PM
AruN
AruN - avatar
0
Bro in English
13th Jan 2023, 5:21 PM
AruN
AruN - avatar
0
開課前行為傾向於前述行為小企鵝企鵝侵入性
13th Jan 2023, 5:22 PM
Osmany Baluta
Osmany Baluta - avatar
0
Hello
4th Jun 2024, 3:03 AM
Osmany Baluta
Osmany Baluta - avatar