Skip to content

Commit d115a4f

Browse files
Update dynamic_programming/word_break.py
Co-authored-by: Christian Clauss <[email protected]>
1 parent 3f7292a commit d115a4f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: dynamic_programming/word_break.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ def word_break(string: str, words: list[str]) -> bool:
5858
if not isinstance(string, str) or len(string) == 0:
5959
raise ValueError("the string should be not empty string")
6060

61-
if not isinstance(word_dict, list) or not all(
62-
isinstance(item, str) and len(item) > 0 for item in word_dict
61+
if not isinstance(words, list) or not all(
62+
isinstance(item, str) and len(item) > 0 for item in words
6363
):
6464
raise ValueError("the word_dict should a list of non empty string")
6565

0 commit comments

Comments
 (0)