Python - Text in form disappears
Question: In the following code below, I would like to text to stay in the form when the
submit button is pressed. Currently the text disappears when submit is
pressed.

Here is a tutorial link I've been following:
<https://www.udacity.com/course/viewer#!/c-cs253/l-48736183/e-48754026/m-48717294>

    
    
    import webapp2
    
    form = """
    <!DOCTYPE html>
        <head>
            <title>Unit 2 Rot 13</title>
        </head>
        <body>
            <h2>Enter some text to ROT13:</h2>
            <form method = "post">
                <textarea name="text" value="%(word)s" style="height: 100px; width: 400px;"></textarea>
                <br>
                <input type="submit">
            </form>
        </body>
    </html>
    
    """
    
    class MainHandler(webapp2.RequestHandler):
        def write_form(self, word=""):
            self.response.out.write(form % {"word": word})
    
        def get(self):
            self.write_form()
    
        def post(self):
            string = self.request.get("word")
            self.write_form(string)
    
    
    app = webapp2.WSGIApplication([('/', MainHandler),
    ], debug=True)
    


Answer: 
    string = self.request.get("text")
    

since your form item name is `text`

this harkens back to the fact that you should use good identifiers ...

since you have no post variables named `word` ... trying to get that post
variable gives an empty string

