Q:

python2.7 quit within two input in the same line (separated by space)

I have to input two value in the same line, and they are separated by space.
so that the output would be some thing like this

123 456
input is 123 and 456

so I use the code
a ,b = map(float, raw_input().split())
print ('input is '), a ,(' and '), b

This work
But I want to quit the script immediately when user input "-1"
for example, if user input -1 for value for a, program will stop reading input from user, print 'wrong input'

wrong input

But when i try to input '-1' and press 'enter'
is said

ValueError: need more than 1 value to unpack

is that mean I should not use 'map(float, raw_input().split())' ?

A:

Just put your parameters into a list and then process them:
params = map(float, raw_input().split())

you can then check if params[0] is -1 or the length of the array is different than expected. After your checks you can assign:
a,b=params

