title: IP address and file manipulation python 2.6
body: <p>I am new in python and I need your help to improve part of my script to be more sophisticate.</p>
  <p>==================================== a.py</p>
  <p>devices = ['x.x.x.x', 'x.x.x.x', 'x.x.x.x']</p>
  <p>============================= MAIN CODE</p>
  <p>from a import devices</p>
  <p>for ip in devices:</p>
  <pre><code> ssh connection 
  </code></pre>
  <p>value = +1;</p>
  <pre><code>if value == 1: 
  
     open a specific file 
     run the commands from this file.
  
  elif value == 2: 
  
     open a specific file 
     run the commands from this file.
  
  elif value == 3: 
  
     open a specific file 
     run the commands from this file.
  </code></pre>
  <p>=============================================</p>
  <p>Issue: For each IP address that it stored in a.py file, I need to run specific pack of commands. With the IF statement it is working fine, but if I add more IP address on a.py file need to append my code.</p>
  <p>Thank you all.</p>