pythin taking input for array

x = list(map(int, input("Enter the values with spaces between them: ").split()))
# you can put the data type that you want in the "int" place

Here is what the above code is Doing:
1. It’s taking the input from the user and storing it in a variable called “x”
2. It’s converting the input into a list of integers
3. It’s storing the list in the variable “x”