After receiving complaints about the Kindle edition, I looked closer at it and figured out that the conversion process sucks. Apparently converting to .mobi format strips a lot of important information from the book, most importantly leading tabs. Since white space is important in Python, if the "white space" is removed, the programs won't work.
I am manually going through the book and attempting to rewrite sections of it so they will convert correctly. I am not having much luck at the moment but will keep working at it.
I apologize to anyone who has bought the Kindle edition and was disappointed with it. I highly recommend getting a copy of the PDF (or the paperback, if you like physical books), as those were the original target for the writing software. Those ones are good, apart from some minor typos I expect.
I have noticed that the .epub conversion appears to work better, so I will see if I can successfully convert it to .mobi. If not, I will try something else.