Python mask program