Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

fill python list with input

lst = [ ] 
n = int(input("Enter number of elements : ")) 
  
for i in range(0, n): 
    ele = input()
    lst.append(ele) 
      
print(lst)

# this will add a specified amount of strings to the list (lst) 
Source by www.codegrepper.com #
 
PREVIOUS NEXT
Tagged: #fill #python #list #input
ADD COMMENT
Topic
Name
4+5 =