First, a cluster is not a host. You cannot ping the cluster. The DNS lookup failed for some reason, but over here, the DNS entries for your cluster are correct. It means you have a VPN, old DNS, old python DNS library or some other issues with you internet provider.
Use Atlas UI to retrieve non-SRV connection string for your cluster and try with it.