I understand how the simple list comprehension works eg.:
[x*2 for x in range(5)] # returns [0,2,4,6,8]
and also I understand how the nested
this sequence
res = [x + y for x in l2 for y in l1 ]
is equivalent to
res =[] for x in l2: for y in l1: res.append(x+y)