I wrote some code to ping the servers but I don't want the output on the screen.
But even after sending the output to /dev/null I am getting all the ping details on the screen.
#!/usr/bin/python
import os
import sys
with open(sys.argv[1]) as servers:
    for host in servers:
        response = os.system("ping -q -c 1 "+host+">/dev/null 2>&1")
        if response==0:
            print(host)
        else:
            print(host+"is dead")
 
     
     
    