how to take array input in python in single line with size in python code example Example: taking input of n integers in single line python in a list arr = list(map(int, input().split()))