avatar Bite 295. Join lists

Write a function that accepts a list of lists and joins them with a separator character, therefore flattening and separating.  


>>> join_lists([ ['a', 'b'], ['c'] ], '&')
['a', 'b', '&', 'c']
>>> join_lists([ ['a', 'b'], ['c'], ['d', 'e'] ], '+')
['a', 'b', '+', 'c', '+', 'd', 'e']

Note: Calling the function with an empty list should return None.  


Login and get coding
go back Beginner level
Bitecoin 2X

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

We use Python 3.8