Converting a single line string to integer array in Python
list(map(int, "1 2 3 4 5".split(" ")))
This list comprehension works equally well on Python2 and Python3
[int(x) for x in "1 2 3 4 5".split()]
str.split()
when given no parameters will split on any whitespace