def summand(i): return Expression(f, get_part(list1, i_cur + [i]), get_part(list2, [i] + j_cur))
def summand(i): part1 = get_part(list1, i_cur + [i]) part2 = get_part(list2, [i] + j_cur) return Expression(f, part1, part2)