I'm looking to pass the selected value of an HTML dropdown to my Python script as per below:
main.py
@app.route('/select', methods=['POST', 'GET'])
def select():
operator = request.form.get('operator')
index.html
<select class="form-control" id="operator" name="operator">
<option value="=">=</option>
<option value=">">></option>
<option value="<"><</option>
</select>
The HTML dropdown works fine as far as I can tell, but when I run main.py, nothing is assigned to operator