This code is terrible. Just awful. I wrote it in high school as the final project for a self-directed class where I was teaching myself python. There is no concept of code style or best practices. All of the algorithms are cobbled together, haphazard bodges that happen to work in a decent number of cases. I was trying to prove a point by not looking up the right way to do a lot of the things that this code tries to do, and it is much worse for it. If anything, this was an exercise in perseverence more than any attempt to make usable, readable, or maintainable code.
In the end, this code did some neat things. I want to keep it as a record of how much I've learned since then, and as a cautionary tale for what not to do ever again.