• magic domino

Question related to mission Magic Domino

 

L = [[0,0,3,3], [0,4,2,0], [5,0,0,1], [1,2,1,2]] #magic domino

The first part of code:

import itertools

L1 = list(itertools.product('012345', repeat = 4))

L2 = [list(x) for x in L1 if sum( int(i) for i in x) == 6]

print (L2) # all rows if sum(i) = 6

second part of code

.???????