this is all good (nice use of map) -- though maybe you don't need to read as separate lines to then put it back together again...

And maybe see if  you can use list.extend() and maybe a list comp, to save that nested loop.