fix python code