the python part code