Python assignment shorthand for *casting*
<p>I seem to do this a lot (whether or not I should be is perhaps another topic) in my python codes:</p>

<pre><code>the_list = get_list_generator() 
#So `the_list` is a generator object right now

#Iterate the generator pulling the list into memory
the_list = list(the_list) 
</code></pre>

<p>When doing arithmetic assignments, we have shorthands like such...</p>

<pre><code>the_number += 1
</code></pre>

<p>So, is there some way to accomplish the same shorthand when using a function for assignment. I don't know if there is a built-in that does this, or if I need to define a custom operator (i have never done that), or some other way that ultimately leads to <em>cleaner code</em> (I promise I will only use it for a generic type cast).</p>

<pre><code>#Maybe using a custom operator ?
the_list @= list()
#Same as above, `the_list` was a generator, but is a list after this line
</code></pre>

<hr>

<p><strong>Edit::</strong></p>

<p>I failed to mention originally: This happens to me most often in interactive mode (thus why I wish to cut down required typing). I will try to index an iterator <code>gen_obj[3]</code>, get an error, and then have to cast it.</p>

<p>As suggested, this is probably the best, but ultimately not quite what I am looking for.</p>

<pre><code>the_list = list(get_list_generator())
</code></pre>
