s=' '
if s.strip()=='':
print 's is null'
或者
if not s.strip():
print 's is null'
python 判断字符串是否为空
猜你喜欢
转载自blog.csdn.net/qq_31024823/article/details/87915813
今日推荐
周排行