0
I created this code that takes a molecular formula, eg CH3COOH and calculates its molar mass.
#! /usr/bin/env python3
element_weights = {
'H': 1.00794,
'He': 4.002602,
'Li': 6.941,
'Be': 9.012182,
# ...
'Lv': 293.0,
'Ts': 294.0,
'Og': 294.0,
}
def tokenize(string)...