Python nested list context concatenation
I have a list of lists in python that looks like this:
[['a', 'b'], ['c', 'd']]
I want to create a line like this:
a,b;c,d
Thus, lists must be separated by character ;
, and values โโof the same list must be separated by character,
So far I've tried ','.join([y for x in test for y in x])
that returns a,b,c,d
. Not quite there, though, as you can see.
+3
source to share