I know there are other ways, for example :
from array import * arr = array("i", list(map(int, input("Give an array : ").split())))