Python list lookup with partial match
<p>For the following list:</p>

<pre><code>test_list = ['one', 'two','threefour']
</code></pre>

<p>How would I find out if an item starts with 'three' or ends with 'four' ?</p>

<p>For example, instead of testing membership like this:</p>

<p><code>two in test_list</code></p>

<p>I want to test it like this:</p>

<p><code>startswith('three') in test_list</code>.</p>

<p>How would I accomplish this?</p>
