第9章 类
# 9-2
class User():
"""用户"""
def __init__(self, first_name, last_name):
"""初始化姓名"""
self.first_name = first_name.title()
self.last_name = last_name.title()
def describe_user(self):
"""输出姓名"""
print('This is ' + self.first_name + ' ' + self.last_name + '.')
def greet_user(self):
"""问候"""