python练习题-day25

class Person:
  __key=123
def __init__(self,username,password): self.username=username self.__password=password def __get_pwd(self): return self.__password def login(self): self.__get_pwd() alex=Person("alex","alex3714") print(alex._Person__password) print(alex.get_pwd())

猜你喜欢

转载自www.cnblogs.com/fumy/p/10732400.html