def word_break(s, word_dict):
dp = [False] * (len(s)+<NUM_LIT:1>)<EOL>dp[<NUM_LIT:0>] = True<EOL>for i in range(<NUM_LIT:1>, len(s)+<NUM_LIT:1>):<EOL><INDENT>for j in range(<NUM_LIT:0>, i):<EOL><INDENT>if dp[j] and s[j:i] in word_dict:<EOL><INDENT>dp[i] = True<EOL>break<EOL><DEDENT><DEDENT><DEDENT>return dp[-<NUM_LIT:1>]<EOL>
:type s: str
:type word_dict: Set[str]
:rtype: bool