def contains_pseudoknot(bplist):
    """Checks if a list of base pairs contains a pseudoknot. Returns boolean"""
    for a1, a2 in bplist:
        for b1, b2 in bplist:
            if (a1 < b1 < a2 < b2) or (a2 < b1 < a1 < b2) or (a2 < b2 < a1 < b1):
                return True
    return False