How to write a machine learning algorithms in python?

How to write a machine learning algorithms in python?