Define a class with optional argument in Python

前端 未结 3 678
迷失自我
迷失自我 2021-02-14 14:43
class class1():
    def setdata(self,value1, value2):
    self.data = value1+value2
def display(self):
    print(self.data)

For the above code, when I

3条回答
提交回复
热议问题