title: how we can take value from website by using python code?
body: <pre><code>import urllib
  from datetime import date,timedelta
  import datetime
  import re
  list =["infy.ns","grasim.ns","idea.ns","asianpain.ns","bajaj-auto-eq.ns",
         "drreddy.ns","boschltd.ns","kotakbank.ns","M&amp;M.ns","ultracemc.ns",
         "sunpharma.ns","lt.ns","acc.ns","sbin.ns","bhartiartl.ns",
         "lupin.ns","reliance.ns","hdfcbank.ns","zeel.ns","ntpc.ns",
         "icicibank.ns","cipla.ns","tcs.ns","bpcl.ns","heromotoc.ns"]
  i=0
  while i&lt;len(list):
      url="http://finance.yahoo.com/q?s="+list[i]+"&amp;ql=1"
      htmlfile = urllib.urlopen(url)
      htmltext=htmlfile.read()
      regex='&lt;span id="yfs_l84_'+list[i]+'"&gt;(.+?)&lt;/span&gt;'
      pattern = re.compile(regex)
      price = re.findall(pattern,htmltext)
      print(price)
      i=i+1
  </code></pre>
  
  <p>i have to take value from finance.yahoo.com 
  when i run that code by using terminal then i got all value on terminal but i want to put that value in my desktop text file </p>