Black & Isort changes

This commit is contained in:
2025-10-13 18:00:03 +02:00
parent 9a27cc175c
commit a81316672c
7 changed files with 48 additions and 37 deletions

View File

@@ -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.")