How to monitor internet connectivity using infitnite while loop Python?
How to monitor internet connectivity using infitnite while loop Python? Question: I am using an infinite while loop to perform specific function if internet is available. And to print an statement if internet is not available. Following is the code. import requests,time while True: print("HI") try: requests.get(‘https://www.google.com/’).status_code print(‘online’) except: print(‘offline’) The code works on first …