Skip to content

Commit dcbe9c3

Browse files
Update dynamic_programming/word_break.py
Co-authored-by: Caeden Perelli-Harris <[email protected]>
1 parent 37cb004 commit dcbe9c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dynamic_programming/word_break.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def word_break(string: str, word_dict: list[str]) -> bool:
6060
raise ValueError("the string should be not empty string")
6161

6262
if not isinstance(word_dict, list) or not all(
63-
[isinstance(item, str) and len(item) > 0 for item in word_dict]
63+
isinstance(item, str) and len(item) > 0 for item in word_dict
6464
):
6565
raise ValueError("the word_dict should a list of non empty string")
6666

0 commit comments

Comments
 (0)