Skip to content

Instantly share code, notes, and snippets.

@jonathanagustin
Last active June 6, 2020 20:06
Show Gist options
  • Select an option

  • Save jonathanagustin/8316b898c56f3c59957e49e14ee3105d to your computer and use it in GitHub Desktop.

Select an option

Save jonathanagustin/8316b898c56f3c59957e49e14ee3105d to your computer and use it in GitHub Desktop.
Python way of generating letter-order key-value dictionary
order = 'abcdefghijklmnopqrstuvwxyz'
character_order = {c: i for i, c in enumerate(order)}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment