def compare(s1: str, s2: str) -> bool:
if '*' not in s2:
if s2 == s1:
return True
else:
return False
else:
value_list=s2.split('*')
s_list=[]
for i in value_list:
try:
s_list.append(s1.index(i))
except:
return False
s1_list=[j for j in s_list]
s_list.sort(reverse=False)
if s_list==s1_list:
return True
else:
return False
assert compare("abccd", "abccd") is True
assert compare("abccd", "abcd") is False
assert compare("abccd", "ab*d") is True
assert compare("abccd", "ab*cy") is False
assert compare("abccd", "cd*ab") is False