Triangle Enumeration PurePython
refactoring