import socket


def is_port_open(port):
    """Check if port is open
    
    Arguments:
        port {int} -- port
    
    Returns:
        bool
    """
    with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
        port = int(port)
        return not s.connect_ex(('localhost', port)) == 0