input = """123 328 51 64 45 64 387 23 6 98 215 314 * + * + """ # with open("input.txt", "r") as file: # input = file.read() numbers = [list(map(str, row)) for row in input.splitlines()[:-1]] print(numbers) operators = input.splitlines()[-1] print(operators) # result = [row for row in numbers[0]] # for row in numbers[1:]: # for index in range(len(result)): # element = row[index] # op = operators[index] # if op == "*": # result[index] *= element # elif op == "+": # result[index] += element # count = 0 # for row in result: # count += row # print(result) # print(count)