Black & Isort changes
This commit is contained in:
@@ -4,13 +4,14 @@ def get_Books(book_list):
|
||||
for book in book_list:
|
||||
print(f"{book['id']}: {book['name']}")
|
||||
|
||||
|
||||
def set_Book(book_list):
|
||||
while True:
|
||||
try:
|
||||
book_to_backup = int(input("Enter the book ID to backup: "))
|
||||
if any(book['id'] == book_to_backup for book in book_list):
|
||||
if any(book["id"] == book_to_backup for book in book_list):
|
||||
return book_to_backup
|
||||
else:
|
||||
print("Invalid book ID, please try again.")
|
||||
except ValueError:
|
||||
print("Please enter a valid number.")
|
||||
print("Please enter a valid number.")
|
||||
|
||||
Reference in New Issue
Block a user