How do I look up for a specific part / extension of file name?
<p>I want to look for the extension of a filename, and the extension can only be 3 characters long.</p>

<p>it is something like, </p>

<pre><code>filename = str(input("Please enter filename: "))
</code></pre>

<p>then I want to execute a task to look for the extension, and if the extension doesn't fulfill the requirement (i.e. 3 characters long), I'll add print "Invalid extension!" Else, print "Valid extension."</p>
