Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions library.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,12 @@ def remove_book(filename, isbn):

# How can we *remove* an item from a dictionary?
# Write code to delete the book keyed by isbn in the space below

if 'isbn' in books:
del books['isbn']
# Now write code that saves the new version of the data to your library

with open(filename) as f:
json.dump({'students':students, 'books':books}, f)

def check_out(filename, isbn, s_id):
students, books = open_library(filename)

Expand All @@ -82,7 +85,9 @@ def status(filename):
students, books = open_library(filename)
# Print out two lists - one of all books currently checked out,
# and one of all available books.

pass
if books[isbn] == True:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this meets the requirements of the function.

return isbn
else:
return isbn