create list for for-loop
<p>I have a script that creates a number of console links (with an html body built around) to VMs for faster access, the console links are put together by a number of strings and variables. </p>

<p>I want to create a list the contains all the links created. </p>

<p><strong>Nevermind I already created a list of all links, lost the overview of my script ...</strong></p>

<p>Probably you would want to modify your script to store the links in a data-structure like a list:</p>

<pre><code>links = list()
...
# iteration happens here
link =  'https://' + host + ':' + console_port + '...'
print link
links.append(link)
# script done here; return or use links
</code></pre>

<p>In the end you can then return/use the list of all links you collected.</p>

python