title: Show ping information using Python
body: <p>I have a working on pinging another computer (windows) from my computer(windows). Im using Python code. My code as below</p>
  
  <pre><code>import os
  hostname = "192.168.1.2"
  response = os.system ("ping -c 5 " +hostname)
  
  if response ==0:
      print(hostname, "is up")
  else:
      print(hostname, "is down")
  </code></pre>
  
  <p>and i got the output as such </p>
  
  <pre><code>PING 192.168.1.2 (192.168.1.2) 56(84) bytes of data.
  64 bytes from 192.168.1.2: icmp_seq=1 ttl=128 time=1.47 ms
  64 bytes from 192.168.1.2: icmp_seq=2 ttl=128 time=0.816 ms
  64 bytes from 192.168.1.2: icmp_seq=3 ttl=128 time=0.584 ms
  64 bytes from 192.168.1.2: icmp_seq=4 ttl=128 time=0.749 ms
  64 bytes from 192.168.1.2: icmp_seq=5 ttl=128 time=0.601 ms
  
  --- 192.168.1.2 ping statistics ---
  5 packets transmitted, 5 received, 0% packet loss, time 4003ms
  rtt min/avg/max/mdev = 0.584/0.844/1.470/0.325 ms
  ('192.168.1.2', 'is up')
  </code></pre>
  
  <p>How can i set it appear something like this after the statistics information?</p>
  
  <pre><code>Highest ping is 200 and lowest ping 40
  ('192.168.1.2', 'is up')
  </code></pre>
  
  <p>or </p>
  
  <pre><code>Ping is too high. consider reboot the network
  ('192.168.1.2', 'is up')
  </code></pre>