How to ignore numbers when doing string.startswith() in python?
<p>I have a directory with a large number of files. The file names are similar to the following: the(number)one(number), where (number) can be any number. There are also files with the name: the(number), where (number) can be any number. I was wondering how I can count the number of files with the additional "one(number)" at the end of their file name.</p>

<p>Let's say I have the list of file names, I was thinking of doing</p>

<pre><code>for n in list:
    if n.startswith(the(number)one):
        add one to a counter
</code></pre>

<p>Is there anyway for it to accept any number in the (number) space when doing a startswith?</p>

<p>Example:
the34one5
the37one2
the444one3
the87one8
the34
the32</p>

<p>This should return 4.</p>
