String comparing in python
<p>I have an array of strings like </p>

<pre><code>urls_parts=['week', 'weeklytop', 'week/day']
</code></pre>

<p>And i need to monitor inclusion of this strings in my url, so this example needs to be triggered by weeklytop part only:</p>

<pre><code>url='www.mysite.com/weeklytop/2'
for part in urls_parts:
    if part in url:
       print part
</code></pre>

<p>But it is of course triggered by 'week' too.
What is the way to do it right?</p>

<p>OOps, let me specify my question a bit.
I need that code not to trigger when url='www.mysite.com/week/day/2' and part='week'
The only url needed to trigger on is when the part='week' and the url='www.mysite.com/week/2' or 'www.mysite.com/week/2-second' for example</p>
