def shifou_space(args): ret = True for a in args: if a.isspace(): ret = False break return ret result = shifou_space("123 12312") print("有空格",result)