There is More Than One Way to Solve a Bite Exercise

According to the Zen of Python, “There should be one– and preferably only one –obvious way to do it.” It’s a good principle for designing a program: the more ways there are of doing something, the more confusing the software becomes, along with a host of other problems. In reality, though, there almost always is more than one way to accomplish something. The quotation even displays this fact: it places the dash in two different ways, neither of which are the obvious way.

Watch Me Code – Solving Bite 21. Query a Nested Data Structure

I recorded a video solving Bite 21. Query a nested data structure. The exercise presents us with a dictionary of car manufacturers and their corresponding car models. We will extract various bits and pieces from it as well as sort the nested model lists. This is a common type of data structure so specially for a beginner it is important to have this become second nature. Prepare to learn more about looping, some string operations, and list / dict comprehensions.