Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
You could try something like this, the fields will be separated into two array indexes and then converted to ints.

Code:
>>> numbers = "123 456"
>>> array = numbers.split(' ')
>>> int1 = int(array[0])
>>> int2 = int(array[1])
>>> int1
123
>>> int2
456

You can re-assign the int values to array[0] and array[1] rather than to two new variables if you want to. Don't know what the limit of int is in python, you might have to use long ints instead.
 
You could try something like this, the fields will be separated into two array indexes and then converted to ints.

Code:
>>> numbers = "123 456"
>>> array = numbers.split(' ')
>>> int1 = int(array[0])
>>> int2 = int(array[1])
>>> int1
123
>>> int2
456

You can re-assign the int values to array[0] and array[1] rather than to two new variables if you want to. Don't know what the limit of int is in python, you might have to use long ints instead.

Thanks, I knew I could use split, but I didn't understand the concept at all.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.