read array of integers from input python code example
Example 1: taking input of n integers in single line python in a list
arr = list(map(int, input().split()))
Example 2: taking array input in python
x=[int(input()) for i in range(int(input("How many elements are in list : ")))] print(x)