There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply () below.
If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.
Join the Discussion. Help a fellow learner on their journey.
Ask or answer a question about this exercise by clicking reply () below!
Agree with a comment or answer? Like () to up-vote the contribution!
Perhaps we’ll learn this later, and if so, “just keep going, you’ll learn it later” will be an acceptable answer, but if not:
Would there be a way to make a dictionary with multiple keys so we don’t have to list the fruit over and over every time we want to give it a new property? Something like, for example:
I may be misunderstanding your query but it’s perfectly valid to nest containers so you could have a dictionary where the values of that dictionary were each themselves dictionaries.
Nesting too deeply can be rather difficult to understand and use after a while though. If you find yourself adding structures within structures always take a moment to see if there’s a better option. A few other containers might be suitable for this purpose too, or you might decide to rewrite part of it using new objects with the class keyword.
I suspected classes might be a suggested answer, I have heard of them before. I might play around with your suggestion later and see how useful that is for what I was imagining. Thanks for a response.