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