SZanlongo
9/18/2014 - 2:03 AM

Get integers from a string (space seperated)

Get integers from a string (space seperated)

# https://stackoverflow.com/questions/691946/short-and-useful-python-snippets
S = "1 2 2 3 3 3 4 4 4 4"
print [int(x) for x in S.split()]