python set of 2d list code example
Example 1: python initialize a 2d array
bar = [SOME EXPRESSION for item in some_iterable]
Example 2: print 2d list in one line
import itertools
arr = [[1, 2, 3], [3, 4, 5]]
res = list(itertools.chain(*arr))
print(" ".join(map(str, res)))
1 2 3 3 4 5