Can I use the html <a href></a> tag as a python form submit input type?

In some instances, yes.

Clicking on a hypertext link sends a GET request. The following link and form send similar requests...

<a href="/somescript.php?id=123>Go get it!</a>

<form name="form1" method="GET" action="/somescript.php" >
<input name="id" type="text" value="123" />
<input type="submit" />
</form>

Hypertext links don't send POST requests, although there are ways to trigger a POST request with the help of JavaScript and AJAX. You probably wouldn't want to go down that road if you needed to ensure the behavior of the link remains consistent. What might happen if someone visits your site with JavaScript disabled in their client?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.