def is_valid_source(src, fulls, prefixes):
 return ((src in fulls) or any(((p in src) for p in prefixes)))

def is_valid_source ( src , fulls , prefixes ) : return ( ( src in fulls ) or any ( ( ( p in src ) for p in prefixes ) ) )
return true if the source is valid .