def port_ranges_string(port_ranges):
    """
    Given an array of tuple port ranges return a string that makes this more readable.
    Ex. [[80,80],[443,445]] -> "80,443-445"
    """

    def port_range_string(port_range):
        if port_range[0] == port_range[1]:
            return "{}".format(port_range[0])
        return "{}-{}".format(port_range[0], port_range[1])

    return ",".join(map(port_range_string, port_ranges))