When I print the elements of a list, it puts each element in different rows as shown below.
>>> for x in [1,2,3,4,5]:... print(x)... 12345
>>> for x in [1,2,3,4,5]:
... print(x)
...
1
2
3
4
5
You can add the parameter "end" to the print statement. The value of "end" should be a space(" "). Then print will put all elements in a row with a space between them.
Here is an example:
>>> for x in [1,2,3,4,5]:... print(x, end=' ')...1 2 3 4 5