def pa(b, a): if ft4.ft_len(b) > 0: d = b[0] a = ft_rev_list(a) a.append(d) a = ft_rev_list(a) return a
def pb(a, b): if ft4.ft_len(a) > 0: d = a[0] b = ft_rev_list(b) b.append(d) b = ft_rev_list(b) return b
def sa(mass): if ft4.ft_len(mass) > 1: a = mass[0] mass[0] = mass[1] mass[1] = a
def ss(a, b): if ft4.ft_len(a) > 1 and ft4.ft_len(b) > 1: sa(a) sb(b)
import split as ft4 import cut as ft5 b = [] a = [] c = [] f = [] oper_line = [] oper = '' str1 = '' str2 = '' x = 0 fin1 = open("sortic_text") f = ft4.splitoper(fin1.readline(), f) if ft4.ft_len(sys.argv) > 2: a = ft4.splitoper(sys.argv[1], a) c = ft4.splitoper(sys.argv[1], c) oper_line = ft4.splitoper(sys.argv[2], oper_line) else: print('Выберите способ ввода:' + '\n', ' 1.Ввод строкой' + '\n', ' 2.Считывание с файла') print(' 3.Ввод до "!" чисел и до "*" операций') action = int(input('Способ: ')) if action == 1: str1 = input('Введите числа через пробел: ') a = ft4.splitoper(str1, a) c = ft4.splitoper(str1, c) str2 = input('Введите операции через пробел: ') oper_line = ft4.splitoper(str2, oper_line) if action == 2: for i in f: