title: python - mechanize (setting input into form)
body: <p>I found out how to retreive the html page of a topic from google search using a tutorial.This was given in the tutorial.</p>
  
  <pre><code>import mechanize
  br = mechanize.Browser()
  br.open('http://www.google.co.in')
  br.select_form(nr = 0)
  </code></pre>
  
  <p>I understood till this that it retrieves the form.Then it was given that</p>
  
  <pre><code>br.form['q'] = 'search topic'
  br.submit()
  br.response.read()
  </code></pre>
  
  <p>This does output the html of the page related to the search topic.
  But my doubt is what should this parameter in br.form[parameter] be? Because I tried it for Google News and it gave a successful result.Can someone help me out?</p>