Something like this should solve your problem:
import csv
with open('books.csv') as file:
reader = csv.reader(file)
books = dict(line for line in reader if line)
The file like this:
Booktitle1,Author1
Booktitle2,Author2
Booktitle3,Author3
Will give you:
books = {'Booktitle1': 'Author1', 'Booktitle2': 'Author2', 'Booktitle3': 'Author3'}
The if line
takes care of empty lines
If your file has a header, you can take a look here
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…