def test_combine_lists(self): u = ['a', 'b', 'c'] v = ['1', '2', '3'] w = ['a', '1', 'b', '2', 'c', '3'] self.assertListEqual(w, Question_2.combine_lists(u, v))
def sign_sequence_to_expression(seq): signs = ['+'] + list(seq) digits = map(str, range(1, len(seq) + 2)) expression = ''.join(Question_2.combine_lists(signs, digits)) return expression