def blank(string): """ 判断字符串是否为空或者纯空格 :param string: 字符串 :return: 字符串是否为空或者纯空格 """ return not string or string.isspace()