with open('in.txt') as f:
    print(list(map(int, chain.from_iterable(line.split() for line in f))))
[1, 19, 15, 36, 23, 18, 39, 2, 36, 23, 4, 18, 26, 9, 3, 35, 6, 16, 11]
Создание списка из файла в Python