5 out of 5 users completed this Bite ...
Will you be Pythonista #6 to crack this Bite?
Average Bite difficulty 1-10 rating: 1.0
» You can do it! 😌
In this Bite you are presented with a
listof 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):CHEVROLET - Cavalier - Corvette - Impala ... MERCEDES-BENZ - 300D - 600SEL - E-Class ... VOLKSWAGEN - GTI - Passat - Routan
As you see both manufacturers and models are alphabetically ordered.
You might want to check out
itertools.groupbyfor this one, but there are probably more ways to do it. Have fun and keep calm and code in Python!