Updated writing for python notebook