下面是一个简单的 Python 图书管理系统的代码示例:
# 定义图书类
class Book:
def __init__(self, title, author, price):
self.title = title
self.author = author
self.price = price
# 定义图书管理器类
class BookManager:
def __init__(self):
self.books = []
# 添加图书
def add_book