Book: A Common-Sense Guide to Data Structures and Algorithms, Second Edition
Python Version: CPython version 3.10.0
In the statement def collectAllWords(self, node=None, word="", words=), words= means every time we call collectAllWords we use the same list. This means the list is not empty after the first call.
explanation of why: