diff --git a/README.md b/README.md index 5cbe1f4..672abca 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,9 @@ Example Usage ============= **Python** ```Python -blocklist = ('disposable_email_blocklist.conf') -blocklist_content = [line.rstrip() for line in blocklist.readlines()] -if email.split('@')[1] in blocklist_content: +with open('disposable_email_blocklist.conf') as blocklist: + blocklist_content = {line.rstrip() for line in blocklist.readlines()} +if email.partition('@')[2] in blocklist_content: message = "Please enter your permanent email address." return (False, message) else: