Pregunta de entrevista de Schrödinger

I was asked to build a string parser in python to represent molecules