Updated tutorial as a .py file