mask output in python search