def selection(triple, variables):
    """Apply selection on a RDF triple"""
    bindings = set()
    if variables[0] is not None:
        bindings.add((variables[0], triple[0]))
    if variables[1] is not None:
        bindings.add((variables[1], triple[1]))
    if variables[2] is not None:
        bindings.add((variables[2], triple[2]))
    return bindings