python的len函数

python的len函数:

Python len() 方法返回对象(字符、列表、元组等)长度或项目个数。

如:

ret = os.popen('netstat -ntpl | grep apache2').readlines()
if len(ret) < 2:

if len(ret) == 0:

猜你喜欢

转载自blog.51cto.com/yangzhiming/2129779