title: Python removing specific duplicates from a list
body: <p>I want to remove specific duplicates from a list. With Perl I would do the task with this code:</p>
  
  <pre><code>my @list = ( 'a1', 'a1', 'b1', 'b1' );
  
  my %seen;
  @list = grep( !/a\d/ || !$seen{ $_ }++, @list );
  </code></pre>
  
  <p>and the wanted result would be this:</p>
  
  <pre><code>@list = ( 'a1', 'b1', 'b1' );
  </code></pre>
  
  <p>How could I do this in Python 3 using regular expression and list comprehension. Thanks.</p>