GH avatar Bite 148. Print Car Data Grouped by Manufacturer

In this Bite you are presented with a list of car (manufacturer, model) tuples. Group the data by manufacturer printing the following table output of MANUFACTURER + bullet list of car models.

This is the truncated output you are expected to deliver (see the tests for the full output):

- Cavalier
- Corvette
- Impala


- 300D
- 600SEL
- E-Class


- Passat
- Routan

As you see both manufacturers and models are alphabetically ordered.

You might want to check out itertools.groupby for this one, but there are probably more ways to do it. Have fun and keep calm and code in Python!

Will you be Pythonista #26 to crack this Bite?
It takes an average of ~50 minutes to solve this Bite (submissions 5-240 min).
Pythonistas rate this Bite 1.0 on a 1-10 difficulty scale.
» You can do it! 😌

Buy Now Login and get coding
We use Python 3.7