Last active
April 26, 2022 17:14
-
-
Save anddam/ed8d6baf384bafba54b809b02773c122 to your computer and use it in GitHub Desktop.
split, strip and get unique tokens from a string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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