(seq, pred)
return next((item for item in seq if pred(item)), None)
similar to built-in any() but return the object instead of boolean
similar to built-in any() but return the object instead of boolean
similar to built - in any () but return the object instead of boolean
def first(seq, pred):
    '''similar to built-in any() but return the object instead of boolean'''
    return next((item for item in seq if pred(item)), None)
def first ( seq , pred ) : return next ( ( item for item in seq if pred ( item ) ) , None )