老卫带你学---在线笔试时候的数据输入问题(python)

在我们做在线笔试的时候,不知道如何将数据输入,老卫下面的代码或许可以帮助你

first_line=input().strip().split()
n,l=int(first_line[0]),int(first_line[1])
test=[]
test_n=0
while test_n<n:
    test_tmp=input().strip().split()
    test_tmp=list(map(int,test_tmp))
    test.append(test_tmp)
    test_n+=1

你可能感兴趣的:(python)