Today I learned how I can use the method 'groupdict' from a regex match to get a dictionary with all named groups.
You didn't ask, but let me tell you I learned a lot of maths over at KhanAcademy.