Python Mechanize select a form with no name
If you want to execute code for multiple forms no matter what their name is, you can loop over every form letting your script knowing which form will work next.
currentForm = 0for form in br.forms(): # Iterate over the forms br.select_form(nr = currentForm) # Select the form ''' The code you want to run for every form ''' currentForm += 1 # Add 1 to the current working form so the script knows what form is working next