title: Removing duplicates and blanks in list of list in Python
body: <p>I have a list of list <code>a</code> as follows:</p>
  
  <pre><code>[[u'Apple', '', u'Apple Inc', u'Apple', u'shares ', u'Amazon', u'Amazon', u'Amazon', '', '', u'Apple', u'Kindle', u'iPad', u'Amazon', u'Amazon', '', u'Amazon', u'Kindle', u'Amazon', '', u'iPad', u'iPad', u'iPad', u'Kindle', u'Kindle', u'Nook', u' ', u'sales', '', '', u'Amazon', '', '', '', '', '', ''], [u'United Kingdom', ''], [u'LA']]
  </code></pre>
  
  <p>I need to remove the duplicates and the blanks in this. I tried the following:</p>
  
  <pre><code>a_1 = filter(None,a)
  a_2 = list(set(a_1))
  </code></pre>
  
  <p>This doesn't seem to work because of the error <code>TypeError: unhashable type: 'list'</code>. I tried to convert the list into tuples, but it also didn't work.</p>
  
  <pre><code>a_1 = set(map(tuple,a))
  a_2 = map(list,a_1)
  </code></pre>
  
  <p>I have to preserve the order also. Can someone help me out with this.</p>
  
  <p>Thanks.</p>