How do i ping some ip using python?

how do i ping some ip with python using replit?

if i ping ip like this then i face this error

if when you say ‘ping’, you just mean ‘send a request to’, you would use urllib.request, e.g.

from urllib import request

request.urlopen("176.36.250.212", method="HEAD")

If you need the stats, you could use timeit

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.