title: python - remove dictionary from list if exists
body: <p>I am trying to remove a dictionary from a list if it already exists but it doesn't seem to be working.  Can anyone see what I am doing wrong or advise me what I should be doing</p>
  
  <pre><code>new_dict = {'value': 'some value', 'key': 'someKey'}
  if new_dict in my_list:
      my_list.remove(new_dict)
  </code></pre>
  
  <p>new_list is a list of dictionaries where new_dict is definitely in</p>