title: Write a simple list into a new CSV file
body: <p>I'm new in python and I would like to know <strong>how could I write a new CSV file</strong> which contains a simple list. Then I will use this file in an Excel Worksheet.</p>
  
  <hr>
  
  <p><strong>My ENTIRE code:</strong></p>
  
  <pre><code>import csv
  import urllib
  from bs4 import BeautifulSoup
  
  sock = urllib.urlopen("http://www.fatm.com.es/Datos_Equipo.asp?Cod=03CA0007")
  htmlSource = sock.read()
  sock.close()
  soup = BeautifulSoup(htmlSource)
  
  form = soup.find("form", {'id': "FORM1"})
  table = form.find("table")
  
  entidad = [item.text.strip() for item in table.find_all('td')]
  
  valores = [item.get('value') for item in form.find_all('input')]
  
  lista = entidad
  
  i = 0
  x = 1
  
  while i &lt;=10:
  
  
      lista.insert(i+x, valores[i])
      i += 1
      x += 1
  
  print lista
  
  w = csv.writer(file(r'C:\Python27\yo.csv','wb'),dialect='excel')
  w.writerows(lista)
  </code></pre>
  
  <hr>
  
  <pre><code>lista = [u'Club', 
           u'CLUB TENIS DE MESA PORTUENSE',
           u'Nombre Equipo',
           u'C.T.M. PORTUENSE',
           u'Telefono fijo',
           u'630970055',
           u'Telefono Movil',
           u'630970055',
           u'E_Mail',
           u'M.LOPEZ_70@HOTMAIL.COM',
           u'Local de Juego',
           u'INSTITUTO MAR DE CADIZ',
           u'Categoria',
           u'DIVISION HONOR ANDALUZA',
           u'Grupo',
           u'GRUPO 9',
           u'Delegado',
           u'SANCHEZ SANTANO, JOSE MARIA',
           u'*Dias de Juego',
           u'SABADO',
           u'*Hora de Juego',
           u'17:00']
  </code></pre>
  
  <p><strong>My results:</strong> an empty CSV file.  :(</p>
  
  <p>Thanks in advance!!!</p>