Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to input a full array in one input in python

n = int(input())
arr = input()   # takes the whole line of n numbers
l = list(map(int,arr.split(' '))) # split those numbers with space( becomes ['2','3','6','6','5']) and then map every element into int (becomes [2,3,6,6,5])
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #input #full #array #input #python
ADD COMMENT
Topic
Name
6+8 =