title: fping using IP list in python3
body: <p>I am new to python and I am trying to scan multiple IPs with fping. I have large number of server to monitor for statistics and I could write the following code that works for 2 hosts:</p>
  
  <pre> 
      import subprocess
      import binascii
  
      out = ''
      err = ''
  
      host1 = '172.2.2.5'
      host2 = '172.1.5.8'
      hosts = '/tmp/ip.list'
  
      ping = subprocess.Popen(['fping', '-C', '10', '-b', '50', '-p', '25', host1, host2], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  
      try:             
          [out, err] = ping.communicate(timeout=15)
  
          print('STDOUT')
          print(out.decode('utf-8').strip())
  
          print('STDERR (Statistics)')
          print(err.decode('utf-8').strip())
  
      except subprocess.TimeoutExpired:
          print('STDERR (expired timeout)')
  </pre>
  
  <p>However, I am unable to replace the two hosts with list of host files, though I tried in multiple ways.</p>
  
  <p>I would very much appreciate any help this regard or any improvements in the program itself.</p>
  
  <p>TIA.</p>