Skip to content

Instantly share code, notes, and snippets.

@johnmay
Created November 28, 2019 12:38
Show Gist options
  • Save johnmay/5b8967968aa15715535ced324f32b65e to your computer and use it in GitHub Desktop.
Save johnmay/5b8967968aa15715535ced324f32b65e to your computer and use it in GitHub Desktop.
elements = {'H': 1, 'He': 2, etc}
def strtoelem(element):
return elemements.get(element, 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment