Skip to content

Instantly share code, notes, and snippets.

@anddam
Last active April 26, 2022 17:14
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 anddam/ed8d6baf384bafba54b809b02773c122 to your computer and use it in GitHub Desktop.
Save anddam/ed8d6baf384bafba54b809b02773c122 to your computer and use it in GitHub Desktop.
split, strip and get unique tokens from a string
def get_flags(key, sep=" "):
return list({stripped for item in get_config_var(key).split(sep) if (stripped := item.strip())})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment