判断是否有空格

 1 #!/usr/bin/env python
 2 def has_space(args) :
 3     ret = True
 4     for c in args :
 5         if c.isspace() :
 6             ret = False
 7             break
 8     return ret
 9 ret = has_space("123)( asd")
10 print(ret)

 

posted @ 2016-12-24 12:10  失落的黎明  阅读(269)  评论(0编辑  收藏  举报