parameterized Constructor Example in Python

8 / 100 SEO Score
class Demo:
b=0
def __init__(self,m):
self.b=m
f=Demo(10)
print(f.b)

Leave a Reply

Your email address will not be published. Required fields are marked *