stoichiograph

Spell words with elemental symbols from the periodic table.
git clone git://git.amin.space/stoichiograph.git
Log | Files | Refs | LICENSE

commit 527c81ce07c6fbccd59de88fd2f7bb4de6eaf1f5
parent 3a50a58528c589a3f93da1e87611164b69f8978e
Author: amin <dev@aminmesbah.com>
Date:   Wed, 27 Jan 2016 00:53:48 +0000

import list of symbols from .csv

FossilOrigin-Name: cb73e7eb612868647a8e5c8aec23b6966d9f48c1444d4cc8fcd968acb15029fc
Diffstat:
Mspeller.py | 19+++++++++++++++++++
1 file changed, 19 insertions(+), 0 deletions(-)

diff --git a/speller.py b/speller.py @@ -1 +1,20 @@ +import csv +def main(): + symbols = get_symbols('elements.csv') + print(symbols) + + +def get_symbols(file_name): + symbols = [] + + with open(file_name) as infile: + csv_reader = csv.reader(infile, skipinitialspace=True, delimiter=',') + next(csv_reader, None) + for row in csv_reader: + symbols.append(row[1]) + + return symbols + +if __name__ == '__main__': + main()