how to take input elements of array in new lines in python code example Example: how to take array input in python in single line arr = list(map(int, input().split()))