input 2 variables separated by a comma in a single line

后端 未结 5 1344
长发绾君心
长发绾君心 2021-01-19 15:11

Is it possible to input 2 numbers int or float separated by a comma in a single line?

Say after the program runs it would ask the user to <

5条回答
  •  太阳男子
    2021-01-19 15:54

    In python3 you can directly use input() method instead of raw_input()

    var1,var2 = input().split(',')
    

提交回复
热议问题