Получить ввод списка от пользователя в Python
a = list(map(int,input("\nEnter the numbers : ").strip().split()))
Faithful Flamingo
a = list(map(int,input("\nEnter the numbers : ").strip().split()))
list1 = []
length = int(input("input the length of your list"))
print("Input values of the list")
for i in range(length):
values = int(input())
list1.append(values)
print(list1)
# Create an empty list
Elements = list()
# Iterating till the range of elements that has to be input
for i in range(0, int(input("Enter the number of elements: "))):
Elements.append(input("Enter the " + str(i + 1) + " input: ")) # Adding the element to the list
#Printing the list
print(Elements)