You will be given two strings `a` and `b` consisting of lower case letters, but `a` will have at most one asterix character. The asterix (if any) can be replaced with an arbitrary sequence (possibly empty) of lowercase letters. No other character of string `a` can be replaced. If it is possible to replace the asterix in `a` to obtain string `b`, then string `b` matches the pattern. 

If the string matches, return `true` else `false`. 

```
For example:
solve("code*s","codewars") = true, because we can replace the asterix(*) with "war" to match the second string. 
solve("codewar*s","codewars") = true, because we can replace the asterix(*) with "" to match the second string. 
solve("codewars","codewars") = true, because the strings already match.
solve("a","b") = false
```
More examples in test cases. 

Good luck!

Difficulty: introductory

Starter code:

def solve(a,b):
	

Solutions:
from fnmatch import fnmatch

def solve(a, b):
    return fnmatch(b, a)

import re
def solve(a,b):
    return bool(re.fullmatch(a.replace('*', '.*'), b))

def solve(a,b):
  if a == b: return True
  if "*" not in a: return False
  
  sides = a.split("*")
  missing = b[len(sides[0]):len(b)-len(sides[1])]
  c = a.replace("*", missing)
  return c == b


solve=lambda Q,S:not __import__('re').sub(Q.replace('*','.*'),'',S)

def solve(a,b):
    s = a.find("*")
    if s == -1:
        return a == b
    else:
        a = list(a)
        b = list(b)
        del b[s:s+1+len(b)-len(a)]
        a.remove("*")
        return a == b

import re

def solve(a, b):
    return bool(re.match(f"^{a.replace('*', '.*')}$", b))


# without re
#
#def solve(a, b):
#    if "*" in a:
#        s, e = a.split("*")
#        return b.startswith(s) and b.replace(s, "").endswith(e)
#    else:
#        return a == b


import re

def solve(a,b):
    pattern = a.replace("*", ".*")
    return bool(re.fullmatch(pattern, b))

import re

def solve(a,b):
    pattern = f'^{a.replace("*", ".*")}$'
    return bool(re.match(pattern, b))


import re
def solve(a,b):
    rx = '^' + '.*'.join(a.split('*')) + '$'
    return bool(re.search(rx,b))

solve=lambda a,b:a==b or('*'in a and(lambda l:not(l[0]==l[1]==b)and b.startswith(l[0])and b.endswith(l[1]))(a.split('*')))