If I explain what I think I'm doing, I hope someone can explain what I'm wrong about.
I have the following dictionary:
ls = [{ 'The Wolf Gift (13)': { 'cover': 'V:\\Books\\Anne Rice\\The Wolf Gift (13)\\cover.jpg', 'author': 'Anne Rice', 'year': '1988' }, 'Mummy (14)': { 'cover': 'V:\\Books\\Anne Rice\\Mummy (14)\\cover.jpg', 'author': 'Anne Rice', 'year': '1989' }, }]
First of all, is the above multi-dimensional dictionary? I want to make sure I'm talking about the right thing. Secondly, how do I get through it to get information at different levels. The dictionary is dynamically filled, so I do not know the keys before starting work.
I tried for book in ls and then book['cover'] , etc., but it does not seem to work. I need the title of the book, and then additional information for each book (cover, etc.). I am new to python. I come from PHP, and using arrays is my bread and butter, but python is killing me ....
thanks
source share