📜  如何在python代码示例中的一个输入中输入一个完整的数组

📅  最后修改于: 2022-03-11 14:47:15.197000             🧑  作者: Mango

代码示例1
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])