Created
January 10, 2016 13:12
-
-
Save KIDJourney/869baeb768c3ea743277 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f = open('file.txt') | |
output1 = open('contained.txt','w') | |
output2 = open('notcontained' , 'w') | |
rule = 'aeoiu' | |
for line in f.readlines(): | |
result = [i for i in rule if i in line] | |
if result: | |
output1.write(line) | |
else : | |
output2.write(line) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment