fixed margins and syntax highlighting

There were some hard tabs that messed up the indentation in some loops. I also added syntax highlighting for python along the way.