\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{k} \PYG{o}{=} \PYG{l+m+mi}{3}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k}{for} \PYG{n}{i} \PYG{o+ow}{in} \PYG{n+nb}{range}\PYG{p}{(}\PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{ys}\PYG{p}{)):}
\PYG{g+go}{        model = kNN.train(xs[:i]+xs[i+1:], ys[:i]+ys[i+1:], k)}
\PYG{g+go}{        print(\PYGZdq{}True:\PYGZdq{}, ys[i], \PYGZdq{}Predicted:\PYGZdq{}, kNN.classify(model, xs[i]))}
\PYG{g+go}{True: 1 Predicted: 1}
\PYG{g+go}{True: 1 Predicted: 0}
\PYG{g+go}{True: 1 Predicted: 1}
\PYG{g+go}{True: 1 Predicted: 1}
\PYG{g+go}{True: 1 Predicted: 1}
\PYG{g+go}{True: 1 Predicted: 1}
\PYG{g+go}{True: 1 Predicted: 1}
\PYG{g+go}{True: 1 Predicted: 1}
\PYG{g+go}{True: 1 Predicted: 1}
\PYG{g+go}{True: 1 Predicted: 0}
\PYG{g+go}{True: 0 Predicted: 0}
\PYG{g+go}{True: 0 Predicted: 0}
\PYG{g+go}{True: 0 Predicted: 1}
\PYG{g+go}{True: 0 Predicted: 0}
\PYG{g+go}{True: 0 Predicted: 0}
\PYG{g+go}{True: 0 Predicted: 0}
\PYG{g+go}{True: 0 Predicted: 1}
\end{Verbatim}
