def matches_schema(pattern, schema, ambiguity_character='*'):
 if (len(pattern) != len(schema)):
  return 0
 for pos in range(len(pattern)):
  if ((schema[pos] != ambiguity_character) and (pattern[pos] != ambiguity_character) and (pattern[pos] != schema[pos])):
   return 0
 return 1

def matches_schema ( pattern , schema , ambiguity_character = '*' ) : if ( len ( pattern ) != len ( schema ) ) : return 0 for pos in range ( len ( pattern ) ) : if ( ( schema [ pos ] != ambiguity_character ) and ( pattern [ pos ] != ambiguity_character ) and ( pattern [ pos ] != schema [ pos ] ) ) : return 0 return 1
determine whether or not the given pattern matches the schema .