Python2.7在一行输入多个数字

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/imotolove/article/details/80778371

输入一个数字 m = int(raw_input())

输入两个数字是 m, n = map(int, raw_input().split())

三个及三个以上类似:

 a, b, c = map(int, raw_input().split())

 a, b, c, d = map(int, raw_input().split())


连续输入,类似while(cin>>)

while true:

    try:

       s=raw_input()

   execpt:

       break;

猜你喜欢

转载自blog.csdn.net/imotolove/article/details/80778371