def find( s, target ):
    """version of find that returns len( s ) when target is not found"""
    result = s.find( target )
    if result == -1: result = len( s )
    return result
version of find that returns len( s ) when target is not found
recipes/Python/355531_Simple_patternbased_string/recipe-355531.py