Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

python user input in arraylist

number_list = []
n = int(input("Enter the list size "))

print("
")
for i in range(0, n):
    print("Enter number at index", i, )
    item = int(input())
    number_list.append(item)
print("User list is ", number_list)
Source by pynative.com #
 
PREVIOUS NEXT
Tagged: #python #user #input #arraylist
ADD COMMENT
Topic
Name
2+8 =