Skip to content

Instantly share code, notes, and snippets.

@tommorris
Last active June 15, 2019 12:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tommorris/b7255f5cee13a530ee4b0b2fc5af989c to your computer and use it in GitHub Desktop.
Save tommorris/b7255f5cee13a530ee4b0b2fc5af989c to your computer and use it in GitHub Desktop.
Little code sample for blog post
PREFIXES = ["https://tommorris.org"]
def prefix_check(url):
for prefix in PREFIXES:
if url.startswith(prefix):
return url
return ""
@mayank2yk
Copy link

Please correct if i am not wrong, seems like we have typo issue as PREFIX is not define. i think it should be prefix.

@tommorris
Copy link
Author

Thanks @mayank2yk. Will fix this when I’m at my computer later.

@tommorris
Copy link
Author

Fixed. Thanks again @mayank2yk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment