new python code