space separated array input in python code example
Example 1: take space separated int input in python
inp = list(map(int,input().split()))
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