python判断字符串

来源:互联网 发布:Linux check_match 编辑:程序博客网 时间:2024/06/11 19:11

1.str.strip()=='' 和str.isspace()不能区分开是空格还是字符串为空

2.str=='',可以判断字符串为空,不包括空格