Answers for "print 2d list in one line"

0

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
Posted by: Guest on June-23-2020

Code answers related to "print 2d list in one line"

Python Answers by Framework

Browse Popular Code Answers by Language