判断字符串
python2
isinstance(s, basestring)
python3
isinstance(s, str)
None bool int float complex str list tuple set dict and, of course, custom types (classes)
判断是否包含空格
str.isspace()
参考
https://stackoverflow.com/questions/4843173/how-to-check-if-type-of-a-variable-is-string
https://stackoverflow.com/questions/35490420/how-to-check-type-of-object-in-python
https://stackoverflow.com/questions/2405292/check-if-string-contains-only-whitespace



