标签:str
#!/usr/bin/python
import os
dir = "/root/mi_Wng"
str = "_W"
if str in os.path.basename(dir):
print os.path.basename(dir):wq
判断目录名是否包括某字符
原文地址:http://blog.51cto.com/yangzhiming/2128190