How to use a wildcard in python to check for any extension
<p>I am trying to check the input to see if it has any extension here is the code I used:</p>

<pre><code>filename=input()
if "." in filename:
    print ("There is")
</code></pre>

<p>However this will return "there is" even if the input is ends with just a full stop.<br>
  Is there any way to check if the input has any letters after the "."?
  I can't specify what the extension should be (as it is up to the user), just that there should be an extension. </p>

<p>Split the string on the dot and check to see if there was anything after it.</p>

<pre><code>s = 'aaa.'
if s.strip().split('.')[-1]:
    print('extension')
else:
    print('no extension')
s = 'aaa.bbb'
if s.strip().split('.')[-1]:
    print('extension')
else:
    print('no extension')
</code></pre>

python wildcard