I have a list of lists:
a = [[1, 3, 4], [2, 5, 7]]
I want the output in the following format:
1 3 4
2 5 7
I have tried it the following way , but the outputs are not in the desired way:
for i in a:
for j in i:
print(j, sep=' ')
Outputs:
1
3
4
2
5
7
While changing the print call to use end
instead:
for i in a:
for j in i:
print(j, end = ' ')
Outputs:
1 3 4 2 5 7
Any ideas?