how to append to a vector in python code example Example: numpy python add array x1 = [1, 2] x2 = [1, 2] print(np.add(x1, x2)) # [2, 4]