Python implementation of the KMeans Algorithm