I'm writing a Python module, and I want many of the functions to have access to information on the periodic table; namely, atomic numbers and their corresponding atomic symbols. The information should never change. I'm struggling with how to implement this.
Hash vs. tuple: A hash would provide very convenient lookup, but could easily be changed. A tuple at least is immutable.
Variable vs. class: I've been trying to keep everything in my module in classes when possible, but I'm not sure that makes sense here, since there should only ever be one periodic table. One source of truth.
Maybe I'm missing something entirely. I've just never seen someone hardcode that much information in the Python projects I've looked at. Guidance would be very appreciated.
Lots of people have already encoded the periodic table in textual form. Ask them for their data. For example if your software is compatible with Wikipedia's licence, then grab the data from them programmatically and put it in a database of some sort, or just grab it on demand.