K nearest Neighbours Implementation

https://online.codingblocks.com/app/player/209779/content/201824/1283/lecture
at 9:20 in this video

d= dist(querypoint, X[i])

what is X[i]? is the array X filled with zeros? bcz when prateek bhaiya used print(x) there were no zeros in the data but rather 2 columns of floating point numbers, but then the function at the end returns if the query point belongs to class 0 or class 1
X[i[ is an array with 2 columns, how can we access its elements without giving the column number?

and please give an explanantion on how does the KNN work , we take values from 2 columns of X and try to predict which column the query point would belong to using a 1D array Y which gives the first half of X[i] a label 0 and the last half a label of 1? if possible please upload another video in the course for knn its very confusing as of now

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.