title: Python AttributeError: '_io.TextIOWrapper' object has no attribute 'wirte'
body: <p>Im learning python from thenewboston series on youtube. This is from tutorial 24 Downloading Files from the Web. I have written the same program as on the video:</p>
  
  <pre><code>from urllib import request
  
  goog_url = 'https://docs.google.com/spreadsheet/ccc?
  key=0At2sqNEgxTf3dEt5SXBTemZZM1gzQy1vLVFNRnludHc&amp;output=csv'
  
  
  def download_stock_data(csv_url):
     response = request.urlopen(csv_url)
     csv = response.read()
     csv_str = str(csv)
     lines = csv_str.split("\\n")
     dest_url = r'goog.csv'
     fx = open(dest_url, "w")
     for line in lines:
        fx.wirte(line + "\n")
     fx.close()
  
  download_stock_data(goog_url)
  </code></pre>
  
  <p>And yet i get these errors:</p>
  
  <pre><code>Traceback (most recent call last):line 18, in &lt;module&gt;
      download_stock_data(goog_url)
  
  line 14, in download_stock_data
      fx.wirte(line + "\n")
  AttributeError: '_io.TextIOWrapper' object has no attribute 'wirte'
  </code></pre>
  
  <p><a href="https://www.youtube.com/watch?v=MjwWzBiAMck&amp;list=PL6gx4Cwl9DGAcbMi1sH6oAMk4JHw91mC_&amp;index=24" rel="nofollow noreferrer">This is the video link</a></p>
  
  <p>Any help is greatly appreciated.</p>