Sidebar Ad


Python : Program To Detect Computer Is Connected To Internet Or Not


In this post we will learn how to make a python program that detect the internet connection

Code :


import socket
if findhost=="":
#Detecting Localhost
    print("No Internet Connection")
    print("Internet Connection Exist")

Output :
If Internet Connection Exist , It Will Print Text “Internet Connection Exist” Otherwise It Will Show “No Internet Connection”


App ID

I'm Tech Expert, Programmer , Web Developer, Owner Of this site and much more 😁

    Leave Your Comment

    Your email address will not be published.*