How do you create multiple variables from raw input in python?
<p>Beginner with python here. I've been doing some online tutorials and can't seem to find the solution to this question. What I'd like to do is this:</p>

<pre><code>hostname = raw_input("Type host name here: ")
</code></pre>

<p>Then the user inputs as many host names as they like, type done, then what they entered becomes variables for use in the script. So if they typed HOST1, HOST2, HOST3, done then the script would run commands for each entry. Example:</p>

<pre><code>def myhostsbecomevariables(*args):
      arg1, arg2, arg3, etc etc etc = args
      print "arg1: %r, arg2: %r, etc: %r, etc: %r" % (arg1, arg2, etc etc)

myhostsbecomevariables(HOST1, HOST2, HOST3)
</code></pre>

<p>If the user types in 3 host names then myhostbecomesvariables uses 3 arguments. If they had typed 5 host names then it would have 5 arguments. </p>
