Here , simply add the remaining elements to the vector v
for k in range ( i , len ( v1 ) ) : NEW_LINE INDENT v . append ( v1 [ k ] ) NEW_LINE DEDENT for k in range ( j , len ( v2 ) ) : NEW_LINE INDENT v . append ( v2 [ k ] ) NEW_LINE DEDENT return v NEW_LINE