Testing connectivity without netcat

I encountered a server that did not have netcat or telnet installed, and I needed to check the connectivity against a server on a certain port. How did I solve this? There are multiple options!

If you have netcat installed:

nc -zv example.com 443

With bash:

timeout 3 bash -c '</dev/tcp/example.com/443' && echo "Port is open" || echo "Port is closed"

With python:

python3 -c "import socket; s=socket.socket(); s.settimeout(3); s.connect(('example.com', 443))" && echo "Port is open" || echo "Port is closed"