I got a short question regarding python: How to do read specific lines from a file? By using multiple filters, bellow is my current code that doesn't show the expected results for me:
for line in loglist:
if (str('send') and str('packet')) in line:
print line
So, what I want is to print lines that contains both the words "send" and "packet", but it prints all lines that contain either send or packet.
many thanks in advance guys,