By reading this article, you’ll learn to define your own function that can check for internet connectivity in Python. If you’re dealing with expensive operations that rely on an internet connection, it’s highly recommended to check for internet connectivity beforehand.
#python