comefrom: <doocs>1813.Sentence Similarity III_1.py
code: def areSentencesSimilar( sentence1: str, sentence2: str) -> bool:
      if sentence1 == sentence2:
          return True
      n1, n2 = len(sentence1), len(sentence2)
      if n1 == n2:
          return False
      if n1 < n2:
          sentence1, sentence2 = sentence2, sentence1
      words1, words2 = sentence1.split(), sentence2.split()
      i = j = 0
      n1, n2 = len(words1), len(words2)
      while i < n2 and words1[i] == words2[i]:
          i += 1
      if i == n2:
          return True
      while j < n2 and words1[n1 - 1 - j] == words2[n2 - 1 - j]:
          j += 1
      return j == n2 or i + j == n2
masked: def sample_funcname ( var_0 : str , var_1 : str ) -> bool :
      if var_0 == var_1 :
          return True
      var_2 , var_3 = len ( var_0 ) , len ( var_1 )
      if var_2 == var_3 :
          return False
      if var_2 < var_3 :
          var_0 , var_1 = var_1 , var_0
      var_4 , var_5 = var_0.split ( ) , var_1.split ( )
      var_7 = var_6 = 0
      var_2 , var_3 = len ( var_4 ) , len ( var_5 )
      while var_7 < var_3 and var_4 [ var_7 ] == var_5 [ var_7 ] :
          var_7 += 1
      if var_7 == var_3 :
          return True
      while var_6 < var_3 and var_4 [ var_2 - 1 - var_6 ] == var_5 [ var_3 - 1 - var_6 ] :
          var_6 += 1
      return var_6 == var_3 or var_7 + var_6 == var_3
  