9-11 导入Admin 类 : 以为完成练习9-8而做的工作为基础, 将User 、 Privileges 和Admin 类存储在一个模块中, 再创建一个文件, 在其中创建一个Admin 实例
并对其调用方法show_privileges() , 以确认一切都能正确地运行。
#a9_11.py
class User():
"""Represent a simple user profile."""
def __init__(self, first_name, last_name, username, email, location):
"""Initialize the user."""
self.first_name = first_name.title()
self.last_name = last_name.title()
self.username = username
self.email = email
self.location = location.title()