How to make any method act as __init__ in Python?

后端 未结 0 1614
难免孤独
难免孤独 2021-01-26 07:31

When I run something like:

class Compliment():
   def __init__(self):
      self.Hello = "HI"
   def Bye(self):
      self.bye = "BYE"
print(C         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题