this is my file
i tried this but I need some other way with open(record_file_name, ‘r’) as file:
for line in file:
parts = line.strip().split(‘, ‘)
book_id = parts[0]
if book_id not in self.books:
self.books[book_id] = Book(book_id)
for record in parts[1:]:
member_id, days = record.split(': ')
if member_id not in self.members:
self.members[member_id] = Member(member_id)
self.books[book_id].adding_record(member_id, days)
self.members[member_id].add_book(book_id, days)
New contributor
k_3 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.