comefrom: <doocs>0139.Word Break_1.py
code: def wordBreak( s: str, wordDict: List[str]) -> bool:
      words = set(wordDict)
      n = len(s)
      dp = [False] * (n + 1)
      dp[0] = True
      for i in range(1, n + 1):
          for j in range(i):
              if dp[j] and s[j:i] in words:
                  dp[i] = True
                  break
      return dp[-1]
masked: def sample_funcname ( var_0 : str , var_1 : List [ str ] ) -> bool :
      var_2 = set ( var_1 )
      var_3 = len ( var_0 )
      var_4 = [ False ] * ( var_3 + 1 )
      var_4 [ 0 ] = True
      for var_5 in range ( 1 , var_3 + 1 ) :
          for var_6 in range ( var_5 ) :
              if var_4 [ var_6 ] and var_0 [ var_6 : var_5 ] in var_2 :
                  var_4 [ var_5 ] = True
                  break
      return var_4 [ - 1 ]
  