updated letter template to python