#方法一
if oneString:
print "not empty"
else:
print "empty"
#方法二
if oneString == "":
print "empty"
else:
print "not empty"
【Python】如何判断一个字符串为空
最新推荐文章于 2024-02-26 15:23:16 发布
#方法一
if oneString:
print "not empty"
else:
print "empty"
#方法二
if oneString == "":
print "empty"
else:
print "not empty"