Попробуйте
Bottle +
Bootstrap
bottle.py
# -*- coding: utf-8 -*-
from bottle import route, run, template
PyList = ['one', 'two', 'three']
@route('/form')
def index():
return template('form.html', list=PyList)
run(host='localhost', port=8080)
form.html
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Form</title>
<link rel="stylesheet" type="text/css" href="static/css/bootstrap.min.css">
</head>
<body>
<form name="test" method="post" action="">
<div class="btn-group">
<button type="button" data-toggle="dropdown" class="btn btn-default dropdown-toggle">Кнопка <span class="caret"></span></button>
<ul class="dropdown-menu">
<li><input type="submit" name="num" value={{list[0]}}></li>
<li><input type="submit" name="num" value={{list[1]}}></li>
<li><input type="submit" name="num" value={{list[2]}}></li>
</ul>
</div>
</form>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script type="text/javascript" src="static/js/social-likes.min.js"></script>
<script type="text/javascript" src="static/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="static/js/bootstrap.min.js"></script>
</body>
</html>