I have a text file and I want to display all words that contains both z and x characters.
How can I do that ?
If you don't want to have 2 problems:
for word in file('myfile.txt').read().split(): if 'x' in word and 'z' in word: print word