change C to python