来自https://fishc.com.cn/thread-84737-1-1.html
lst = []
print('请输入数据,直接回车结束:')
while True:
temp = input()
if temp == '':
break
lst.append([int(i) for i in temp.split(' ')])
for i in lst:
print(i)
请输入数据,直接回车结束:
2
3 4 5
7 8 9
[2]
[3, 4, 5]
[7, 8, 9]