Make up your mind: is clean
supposed to be a list or a function? You started as a list, but then replaced that with a function, and then told the function to clean itself. Try this:
dirty_list = readWordList()
def clean(aList):
...
clean(dirty_list)
0
solved TypeError: ‘function’ object is not iterable’ Python 3