Python Wars Machine Learning code