knn learning in python

copy from machine learning in action of chapter 2