avatar Bite 14. Generate a table of n sequences

Write a function that receives one or more sequences. The sequences are already defined for you.

The function should return a table (list of strings) where the columns are the sequences (example below).

To keep it simple we work with equally sized sequences so you don't have to worry about handling a missing value (you should end up with a grid of 6 rows x n columns).

There are some Pythonic idioms you can use here, hint: think of pants ;)

Example call (look at the tests for more detail):

>>> generate_table(names, aliases)
['Julian | Pythonista', 'Bob | Nerd', 'PyBites | Coder', 
 'Dante | Pythonista', 'Martin | Nerd', 'Rodolfo | Coder']

Bonus: use a generator to build up the table rows.

Login and get coding
go back Intermediate level
Bitecoin 3X

308 out of 308 users completed this Bite.
Will you be Pythonista #309 to crack this Bite?
Resolution time: ~39 min. (avg. submissions of 5-240 min.)
Pythonistas rate this Bite 5.0 on a 1-10 difficulty scale.
» Up for a challenge? 💪

Focus on this Bite hiding sidebars, turn on Focus Mode.

Ask for Help