下面我提供的代码一次打印一行输出。但是,我想重写代码,一次打印所有内容。你知道吗
def filters():
for LogLine in Log:
flag = True
for key,ConfLine in Conf.items():
for patterns in ConfLine:
print patterns
if re.match((DateString + patterns), LogLine):
flag = False
break
if(flag == False):
break
if(flag):
print LogLine
谢谢
以下是一般技巧:
有一件事我会做。我将初始化一个空字典或空列表,然后将所有项附加到空字典或空列表中。最后一次打印输出。你知道吗
相关问题 更多 >
编程相关推荐