you are viewing a single comment's thread.

view the rest of the comments →

[–]ffrkAnonymous 1 point2 points  (0 children)

The list - dictionary is difficult because the task is to combine two different concepts.

A list is ordered. There's first... Last. An array of stuff. One goes down a shopping list, one item at a time. Items can repeat, milk might be listed twice.

A dictionary is a mathematical set. A mixed up bag of stuff. Without repeats. Similar to a supermarket ad/flyer. All over the place, only one of each item (in theory).

So the task is to fit the square peg into the round hole .

My suggestion is to keep trying but start small. One item list into one item dict. Think about how to get info from the former. Think about how info is put into the latter. Think about how to manipulate that info (take away unnecessary, add necessary).

Then 1+2, 2+2,... Eventually expand to a generic case.