I have this nested list:
l = [[\'40\', \'20\', \'10\', \'30\'], [\'20\', \'20\', \'20\', \'20\', \'20\', \'30\', \'20\'], [\'30\', \'20\', \'30\', \'50\', \'
The best way to do this in my opinion is to use python's itertools package.
itertools
>>>import itertools >>>l1 = [1,2,3] >>>l2 = [10,20,30] >>>[l*2 for l in itertools.chain(*[l1,l2])] [2, 4, 6, 20, 40, 60]