def fill_notebook(work_notebook, script_blocks):
 for (blabel, bcontent) in script_blocks:
  if (blabel == 'code'):
   add_code_cell(work_notebook, bcontent)
  else:
   add_markdown_cell(work_notebook, text2string(bcontent))

def fill_notebook ( work_notebook , script_blocks ) : for ( blabel , bcontent ) in script_blocks : if ( blabel == 'code' ) : add_code_cell ( work_notebook , bcontent ) else : add_markdown_cell ( work_notebook , text2string ( bcontent ) )
writes the jupyter notebook cells parameters script_blocks : list of tuples .