I have a column in sqlite3 table containing all the chemical elements. There is a column called “Symbol”, where it contains symbols of chemicals. For example, H, Be, Mg.
I would like to pull out all characters from A-Z that does not appear in the column (not case sensitive). Below is what i have currently
conn = sqlite3.connect('chemicals.sqlite')
cur = conn.cursor()
cur.execute('select Symbol from chemicalElements')
rows = cur.fetchall()
for row in rows:
print(row)
Example of table below
| code | Symbol | Name |
|---|---|---|
| 1 | H | Hydrogen |
| 2 | He | Helium |
| 3 | N | Nitrogen |
| 4 | Mg | Magnesium |
In this case, the final output should be alphabets other than H,E,N,M,G