added python solution for wildcard matching