I have a list that contains emails(marketing reasons) and I have to sort them. so it should check the lines if contains that email domain skip it and save the others into the out1 output. I don't know what is the problem. I've tried with this code:
for line in data:
if "hotmail.com" in line:
pass
elif "aol.com" in line:
pass
elif "mail.ru" in line:
pass
elif "orange.fr" in line:
pass
elif "live.com" in line:
pass
elif "interia.eu" in line:
pass
elif "freenet.de" in line:
pass
elif "yahoo.com" in line:
pass
elif "gmx.com" in line:
pass
elif "gmx.de" in line:
pass
elif "msn.com" in line:
pass
elif "free.fr" in line:
pass
elif "gmail.com" in line:
pass
elif "qip.ru" in line:
pass
elif "rambler.ru" in line:
pass
elif "sbcglobal.net" in line:
pass
elif "yandex.com" in line:
pass
elif "aliceadsl.fr" in line:
pass
elif "citromail.hu" in line:
pass
elif "interia.pl" in line:
pass
elif "wanadoo.fr" in line:
pass
elif "op.pl" in line:
pass
elif "t-online.de" in line:
pass
elif "tiscali.it" in line:
pass
elif "bol.com.br" in line:
pass
elif "163.com" in line:
pass
elif "zoho.com" in line:
pass
elif "outlook.com" in line:
pass
elif "comcast.net" in line:
pass
else:
out1.write(line)
Aucun commentaire:
Enregistrer un commentaire