You can achieve this using the splitlines() method in python
splitlines()
data = """1000 2000 3000 4000""" number_list = data.splitlines()