class class1():
def setdata(self,value1, value2):
self.data = value1+value2
def display(self):
print(self.data)
For the above code, when I
Try this please:
def setdata(self, value1, value2 = '000'):
Your code here
class class1:
def setdata(self,value1, value2=456):
self.data = value1+value2
def display(self):
print(self.data)
may be this solves your problem
Try defining a default argument, like so.
class class1():
def setdata(self,value1, value2='000'):
...