Knn Code In Python Using Global Variables