def matcher(l1, l2):
    if l1 == []:
        return l2 == [] or l2 == ['*']
if l2 == [] or l2[0] == '*':
    return matcher(l2, l1)
if l1[0] == '*':
    return matcher(l1, l2[1:]) or matcher(l1[1:], l2)
if l1[0] == l2[0]:
    return matcher(l1[1:], l2[1:])
else:
    pass
Algorithm to match 2 lists with wildcards