title: Python: How to remove duplicate values(case insensitive) from a list with same order with default key 'ID' and other keys in title-case
body: <p>For example:</p>
  
  <p>'L' is a List.</p>
  
  <p>L = ['id', 'Name', 'name', 'Name']</p>
  
  <p>Result: ['ID', Name]</p>
  
  <p>L = ['Name', 'name', 'Status']</p>
  
  <p>Result: ['ID', 'Name', 'Status']</p>
  
  <p>I have tried following code but I want more optmized solution, may be with list comprehension.</p>
  
  <p>field_titles = ['id', 'Name', 'name', 'Name']</p>
  
  <p># Remove duplicate fields</p>
  
  <pre><code>    key_list = ['ID']
      for field in field_titles:
  
          title_field = field.title().strip()
  
          if not title_field == 'Id' and title_field not in key_list:
  
              key_list.append(title_field)
  </code></pre>