[Solved] TypeError: list object is not an iterator | 9to5Answer
TypeError: list object is not an iterator TypeError: list object is not an iterator python flask 26,724 Solution 1 Try using iter () Ex: item = next ( iter ( filter ( lambda x: x [ 'name'] == name, items)), None ) Solution 2 To elaborate on @Rakesh's answer, lists aren't iterators, and the output of filter () in Python 2 is a list.