if you want to string inner one or more special symbol charter
str = "qwe123!@#"
import re
p = re.compile('[^a-zA-Z0-9]+')
print bool(p.search(str))
-> True
if you want to string inner only special symbol charter
import re
p = re.compile('[a-zA-Z0-9]+')
if bool(p.search(str)) == False:
print "use only special symbol charter"
'app > python' 카테고리의 다른 글
python dict in list sort to dict value (0) | 2014.10.17 |
---|---|
python 오늘의 요일 구하기 (0) | 2014.10.16 |
python warning pep8 closing bracket does not match visual indentation (0) | 2014.09.16 |
no module named setuptools (0) | 2014.09.12 |
python Fibonacci Sequence (2) | 2014.09.05 |