Aug-12-2023, 03:20 AM
(This post was last modified: Aug-12-2023, 03:21 AM by deanhystad.)
One of these things is not like the others! The answer is easy to see if you really look and think about the results.
Maybe this will make it easier to see.
Maybe this will make it easier to see.
def ping(ip): return ( ip, subprocess.run( f"ping {ip} -n 1", stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL ).returncode, ) start = time.time() park = ["www.wallmart.com", "www.walmart.com\n"] executor = ThreadPoolExecutor(4) df = pd.DataFrame(executor.map(ping, park), columns=["address", "state"])
Output: address state
0 www.wallmart.com 0
1 www.walmart.com\n 1