The lendBook function does not work as written. The issue comes down to the append method appending the new line character to each book in the text file.
To fix the problem, in the Main activity change booksList.append(book) to booksList.append(book.rstrip()).
The lendBook function does not work as written. The issue comes down to the append method appending the new line character to each book in the text file.
To fix the problem, in the Main activity change booksList.append(book) to booksList.append(book.rstrip()).