print list elements with space python code example
Example 1: print list in one line python
# using * operator
scores = [11, 12, 13, 14, 15, 16]
print(*scores)
Example 2: print list as space separated python
>>> marks = [12, 23, 34, 56]
>>> print(marks)
[12, 23, 34, 56]
>>> print(*marks)
12 23 34 56
// *[listName] can be used to pass all elememts as separate arguements