def fileExpr( expr, fileStr='@' ):
    """If expression contains @file@ read in contents of file and return as a list"""
    if expr.startswith( fileStr ) and expr.endswith( fileStr ):
        return [ line.rstrip() for line in file( expr[1:-1] ).readlines() ]
    else:
        return [ expr ]
If expression contains @file@ read in contents of file and return as a list
recipes/Python/355531_Simple_patternbased_string/recipe-355531.py