Ok, here a solution:<br><br>myFirstList = ["FN067_098_MEN", "FN067_098_JIN", "FN067_098_BG"]
<p style="margin: 0px; text-indent: 0px;">mySecondList = ["FN067_098_MEN_Hair_PUZ_v001.0001.exr","FN067_098_JIN_Hair_SPC_v001.0001.exr","FN067_098_MEN_Jin_MVE_v001.0001.exr","FR043_010_GEN_NRM_v001.0001.exr"]</p>




<p style="margin: 0px; text-indent: 0px;">for n in myFirstList:</p>
<p style="margin: 0px; text-indent: 0px;">        var = str(n)</p>
<p style="margin: 0px; text-indent: 0px;">        for n in mySecondList:</p>
<p style="margin: 0px; text-indent: 0px;">                if var in n:</p>
<p style="margin: 0px; text-indent: 0px;">                         mySecondList.remove(n)</p>
<p style="margin: 0px; text-indent: 0px;">print mySecondList</p><p style="margin: 0px; text-indent: 0px;"><br></p><p style="margin: 0px; text-indent: 0px;">:)<br></p><br><br><div class="gmail_quote">2010/8/31 Alban Nona <span dir="ltr"><<a href="mailto:python.koda@gmail.com">python.koda@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi all,<br><br>Im stuck on this problem:<br>I have a function which return me a list of string (basically the result looks like: ["FN067_098_MEN", FN067_098_JIN", FN067_098_BG"]<br>
In other hand, I have another list full of that kind of entries:<br>

["FN067_098_MEN_Hair_PUZ_v001.0001.exr","FN067_098_JIN_Hair_SPC_v001.0001.exr","FN067_098_MEN_Jin_MVE_v001.0001.exr","FR043_010_GEN_NRM_v001.0001.exr"]<br><br>I would like to do something like this:<br>


<br>myFirstList =  ["FN067_098_MEN", FN067_098_JIN", FN067_098_BG"]<br>mySecondList = ["FN067_098_MEN_Hair_PUZ_v001.0001.exr","FN067_098_JIN_Hair_SPC_v001.0001.exr","FN067_098_MEN_Jin_MVE_v001.0001.exr","FR043_010_GEN_NRM_v001.0001.exr"]<br>


<br>for n in myFirstList:<br>    if n in mySecondList:<br>        mySecondList.remove(n)<br><br>In fact, what I want to do it to remove entries with the secondlist which content the entries of the first one. But it seems to not work like this.<br>

Someone can help me please ? did I miss something ?<br><br>
</blockquote></div><br>