In Python 2, you could write:
numbers = map(int, raw_input().split())
This reads a line, splits it at white spaces, and applies int()
to every element of the result.
If you were using Python 3, the equivalent expression would be:
numbers = list(map(int, input().split()))
or
numbers = [int(n) for n in input().split()]