Skip to content

Instantly share code, notes, and snippets.

@talfco
Created February 4, 2019 21:45
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 talfco/a1d78da2687f4f1f33e0a1f0d894dd52 to your computer and use it in GitHub Desktop.
Save talfco/a1d78da2687f4f1f33e0a1f0d894dd52 to your computer and use it in GitHub Desktop.
def check_for_party(self, account_list):
party_column = []
party_abbreviations = ["FDP", "CVP", "SP", "SVP", "EVP", "BDP"]
for account in account_list:
party = "unknown"
for abbr in party_abbreviations:
if abbr in account.description or abbr in account.screen_name:
party = abbr
party_column.append(party)
return party_column
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment