Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to take user input in a list in python

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)
 
PREVIOUS NEXT
Tagged: #user #input #list #python
ADD COMMENT
Topic
Name
2+2 =