Basic Machine Learning Code Python