diff --git a/item_16_generators_instead_of_lists.py b/item_16_generators_instead_of_lists.py index c180cb0..1c4ff42 100644 --- a/item_16_generators_instead_of_lists.py +++ b/item_16_generators_instead_of_lists.py @@ -10,7 +10,7 @@ def index_words(text): result = [] - if next: + if text: result.append(0) for index, letter in enumerate(text): if letter == ' ':