Thank you for looking into this Yoriz.
I haven't tried an else there. What I found that did work (and it contains an else ) is:
I haven't tried an else there. What I found that did work (and it contains an else ) is:
# The following list is just for the sake of illustration, the actual list comes from reading the blocklist file my_list = ["foo.com/index.html", "bar.com/downloads/malware.exe", "conteso.com/phishing/email.htm", "domain.com/blog/test", "[Adblock]", "another.domain.com/another/test/blog", "blah.net/blah/blah/blah"] for i in my_list: if(re.match('\[Adblock\]', i)): next else: print("This should print only if i is NOT equal to [Adblock].")