# Which version of Python was used in the code examples?

I wrote all code examples in 3.4. I tried to also make sure that everything works fine with Python 2.7, however, I stopped testing the code on Python 2.7 halfway through the book. The reason is that I really don't think that it is really crucial which Python version is being used since most of the libraries towards supporting both Python 2.7 and 3.4 anyways.

Throughout the book, we will also implement our own machine learning algorithms from scratch (linear classifiers, ensemble classifiers, feature selection, and neural networks), and here I paid special attention that it works for Python 2.7 as well.

I think the only parts where Py27 may have a disadvantage is the sentiment analysis chapter due to the quirky Unicode handling. However, I added notes and comments here and there so that you could get along with Python 2.7 just fine I hope!

Anyways, I think the real focus of this book is to learn about the important concepts in Machine Learning, and how to write code to put it to action. Thus, after reading the book, you will hopefully find that you are interested in the bigger questions and be fascinated by the possibilities Python offers to get your analysis done!
