Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to take input for list in python

a = []
s = int(input("Enter the size of array: "))
for i in range(0, s):
    ele = int(input("Enter the elements of the array: "))
    a.append(ele)
print(a) 
Source by www.edureka.co #
 
PREVIOUS NEXT
Tagged: #input #list #python
ADD COMMENT
Topic
Name
5+8 =