title: How to get a value, using python, from a selected option in a drop down list in HTML? (FLASK)
body: <p>I have the following code for my form in HTML:</p>
  
  <pre><code>&lt;div class="container-fluid" id="feedback"&gt;
      &lt;p&gt;&lt;h2&gt;Give us your feedback on the cafe!&lt;/h2&gt;
          &lt;h4&gt;&lt;em&gt;Maximum of 150 Characters.&lt;/em&gt;&lt;/h4&gt;
      &lt;/p&gt;
      &lt;form action="{{ url_for('feedback') }}" method="post"&gt;
          &lt;div class="form-group"&gt;
              &lt;label class="sr-only" for="fb"&gt;Feedback&lt;/label&gt;
              &lt;textarea class="form-control" id="fb" placeholder="Enter your Feedback here..." type="text" maxlength="150"&gt;&lt;/textarea&gt;
          &lt;/div&gt;
          &lt;div class="form-group"&gt;
              &lt;label class="sr-only" for="rating"&gt;Rating for Cafe&lt;/label&gt;
              &lt;select class="form-control" id="rating"&gt;
                  &lt;option&gt;5&lt;/option&gt;
                  &lt;option&gt;4&lt;/option&gt;
                  &lt;option selected&gt;3&lt;/option&gt;
                  &lt;option&gt;2&lt;/option&gt;
                  &lt;option&gt;1&lt;/option&gt;
              &lt;/select&gt;
          &lt;/div&gt;
          &lt;div class="form-group"&gt;
              &lt;input autocomplete="off" autofocus class="form-control" name="postal_code" placeholder="Postal Code of Cafe" type="text"/&gt;
          &lt;/div&gt;
          &lt;div class="form-group"&gt;
              &lt;button class="btn btn-default" type="submit"&gt;Submit!&lt;/button&gt;
          &lt;/div&gt;
      &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I tried to use rating = request.form.get("rating") in my python code to obtain the value of "rating" from the form, however I was unable to get the value in rating at all. How can I get the selected value from the HTML form in python code?</p>