Python Script: Check Ping Status and Lookup Hostname from IP List

Today I got a request to disable insecure SNMP v1 / v2c from a list of IP addresses. If you are still using SNMP v1 / v2c then it's really the time to disable the version and configure secured SNMP v3. Sometime ago I wrote a post on how to install and configure Net-SNMP v3 in Red Hat Enterprise Linux 4, you might wanna check that out as well. So, I had no idea what these servers are because I like to memorize my servers with their host name. And I didn't want to run nslookup or host or dig one by one on each IP. Also, I wanted to check whether these IP are alive / ping-able on my network or not. I could have used for loop and made one complicated command but for couple of reasons I chose not to do that,