So here is my code:
from os import system from datetime import datetime import time import os import subprocess import sys def status(ip_addr): return o