Two values from one input in python?

前端 未结 18 2276
小鲜肉
小鲜肉 2020-11-28 03:46

This is somewhat of a simple question and I hate to ask it here, but I can\'t seem the find the answer anywhere else: is it possible to get multiple values from the user in

18条回答
  •  天命终不由人
    2020-11-28 04:03

    I tried this in Python 3 , seems to work fine .

    a, b = map(int,input().split())
    
    print(a)
    
    print(b)
    

    Input : 3 44

    Output :

    3

    44

提交回复
热议问题