#方法一
if oneString:
print "not empty"
else:
print "empty"
#方法二
if oneString == "":
print "empty"
else:
print "not empty"
【Python】如何判断一个字符串为空
最新推荐文章于 2025-05-10 20:20:00 发布
#方法一
if oneString:
print "not empty"
else:
print "empty"
#方法二
if oneString == "":
print "empty"
else:
print "not empty"