Before, the results of two filter() calls were being added together with the + operator. In Python 3, the filter() built-in function returns an iterator, not a list, so this didn't work. This commit wraps the filter() calls in list() to convert the results to lists before adding them together.
Before, the results of two
filter()
calls were being added together with the+
operator. In Python 3, thefilter()
built-in function returns an iterator, not a list, so this didn't work. This commit wraps thefilter()
calls inlist()
to convert the results to lists before adding them together.