title: How to save the string, one word per column in Python?
body: <p>I'm scraping the names of massage therapists along with their addresses from a directory. The addresses are all being saved into the CSV in one column for the whole string, but the title/name of each therapist is being saved one word per column over 2 or 3 columns.</p>
  
  <p>What do I need to do in order to get the string that's being extracted to save in one column, like the addresses are being saved?  (The top two lines of code are example html from the page, the next set of code is the extract from the script targeting this element)</p>
  
  <pre><code>&lt;span class="name"&gt;
      &lt;img src="/images/famt-placeholder-sm.jpg" class="thumb" alt="Tiffani D Abraham"&gt; Tiffani D Abraham&lt;/span&gt;
  
  
  import mechanize
  from lxml import html
  import csv
  import io
  from time import sleep
  
  def save_products (products, writer):
  
      for product in products:
  
          for price in product['prices']:
              writer.writerow([ product["title"].encode('utf-8') ])
              writer.writerow([ price["contact"].encode('utf-8') ])
              writer.writerow([ price["services"].encode('utf-8') ])
  
  f_out = open('mtResult.csv', 'wb')
  writer = csv.writer(f_out)
  
  links = ["https://www.amtamassage.org/findamassage/results.html?match=exact&amp;l=NY","https://www.amtamassage.org/findamassage/results.html?match=exact&amp;l=NY&amp;PageIndex=2&amp;PageSize=10","https://www.amtamassage.org/findamassage/results.html?match=exact&amp;l=NY&amp;PageIndex=3&amp;PageSize=10","https://www.amtamassage.org/findamassage/results.html?match=exact&amp;l=NY&amp;PageIndex=4&amp;PageSize=10","https://www.amtamassage.org/findamassage/results.html?match=exact&amp;l=NY&amp;PageIndex=5&amp;PageSize=10","https://www.amtamassage.org/findamassage/results.html?match=exact&amp;l=NY&amp;PageIndex=6&amp;PageSize=10","https://www.amtamassage.org/findamassage/results.html?match=exact&amp;l=NY&amp;PageIndex=7&amp;PageSize=10", "https://www.amtamassage.org/findamassage/results.html?match=exact&amp;l=NY&amp;PageIndex=8&amp;PageSize=10", "https://www.amtamassage.org/findamassage/results.html?match=exact&amp;l=NY&amp;PageIndex=9&amp;PageSize=10", "https://www.amtamassage.org/findamassage/results.html?match=exact&amp;l=NY&amp;PageIndex=10&amp;PageSize=10" ]
  
  br = mechanize.Browser()    
  
  for link in links:
  
      print(link)
      r = br.open(link)
  
      content = r.read()
  
      products = []        
      tree = html.fromstring(content)        
      product_nodes = tree.xpath('//ul[@class="famt-results"]/li')
  
      for product_node in product_nodes:
  
          product = {}
  
  
          price_nodes = product_node.xpath('.//a')
  
          product['prices'] = []
          for price_node in price_nodes:
  
              price = {}
              try:
                  product['title'] = product_node.xpath('.//span[1]/text()')[0]
  
              except:
                  product['title'] = ""
  
              try:
                  price['services'] = price_node.xpath('./span[2]/text()')[0]
  
              except:
                  price['services'] = ""
  
              try:
                  price['contact'] = price_node.xpath('./span[3]/text()')[0]
  
              except:
                  price['contact'] = ""
  
              product['prices'].append(price)
          products.append(product)
      save_products(products, writer)
  
  f_out.close() 
  </code></pre>