how to input an array in python in a single input code example Example: how to take array input in python in single line arr = list(map(int, input().split()))