1. 4 2. [1, [2, 3, 2, 3]] [1, [2, 3, 2, 3]] 3. Короткое решение: all_nums = sorted([int(i) for j in text for i in j.strip().replace("-", " ").split()]) print(all_nums) Без replace(): all_nums = sorted([int(t) for j in text for i in j.strip().split() for t in i.split("-")]) print(all_nums) Длинное решение: text_integer = [] for line in text: line = line.strip("\n") line = line.split(" ") for word in line: word = word.split("-") for number in word: number = int(number) text_integer.append(number) text_integer.sort() print(text_integer) Помните, что не всегда короче == лучше! Длинное решение легче читать!