title: how to extract the data from from website and save the into txt file
body: <p>i am using python 3.3.3 and trying to extract the data as well as links in txt file. I have tried this code but it is not creating neither saving any thing in the file.At console if i would write "print(s)" then still does not shows anythings to me.</p>
  
  <pre><code>import urllib.request
  with urllib.request.urlopen("http://www.python.org") as url:
      s = url.read()
      url.close()
  #I'm guessing this would output the html source code?
  #print(s)
  
  # write data
  ff = open("ne.txt", "w")
  ff.write('s')
  ff.close()
  </code></pre>
  
  <p>if i am doing wrong then please tell me the correct criteria because i am also understanding and studying from internet resources.</p>
  
  <p>Any help please....</p>