Prompt for writing the script for monitoring IPFS peering

Write a Python 3 script that is meant to be run in cron. It reads lines from a txt, each line contains an IPv4 or IPv6 address and port, it tries to connect, if it is unreachable, prints the error message.