Is it possible to write this logic in one line statement?
B = []
for book in books:
if book not in B:
B.append(book)
I have tried this but it's false:
B = [book if book not in B for book in books]
Is there a way to reference the variable inside itself?