Alistair King wrote:
> Hi,
>
> ive been trying to update a dictionary containing a molecular formula, but
> seem to be getting this error:
>
>
> Traceback (most recent call last):
> File "DS1excessH2O.py", line 242, in ?
> updateDS1v(FCas, C, XDS)
> NameError: name 'C' is not defined
>
> dictionary is:
>
> DS1v = {'C': 6, 'H': 10, 'O': 5}Try DS1v['C'] instead of DS1v[C]. Cheers, -- Roberto Bonvallet -- http://mail.python.org/mailman/listinfo/python-list
