<p>I'm a C/Python programmer in C++ land working with the STL for the first time.</p>

<p>In Python, extending a list with another list uses the <code>.extend</code> method:</p>

<pre><code>&gt;&gt;&gt; v = [1, 2, 3]
&gt;&gt;&gt; v_prime = [4, 5, 6]
&gt;&gt;&gt; v.extend(v_prime)
&gt;&gt;&gt; print(v)
[1, 2, 3, 4, 5, 6]
</code></pre>

<p>I currently use this algorithmic approach to extend vectors in C++:</p>

<pre><code>v.resize(v.size() + v_prime.size());
copy(v_prime.begin(), v_prime.end(), v.rbegin());
</code></pre>

<p>Is this the canonical way of extending vectors, or if there is a simpler way that I'm missing?</p>

From
here
```
```
// reserve() is optional - just to improve performance
v.reserve(v.size() + distance(v_prime.begin(),v_prime.end()));
v.insert(v.end(),v_prime.begin(),v_prime.end());
```
```