首页 > Python3牛客笔试的多行输入问题
头像
探戈.
发布于 2019-09-15 22:47
+ 关注

Python3牛客笔试的多行输入问题

Python3牛客笔试的多行输入问题
if __name__ == "__main__":
    res = []
    while True:
        p = input()
        if p == '':
            break
        p = list(map(int,p.split()))
        res.append(p)
    print(res)
输入:
2
3 2
1 2
报错:p = input()
EOF错误

全部评论

(1) 回帖
加载中...
话题 回帖