Php Search String For Substring In Python