I get the "main loop 'builtin_function_or_method' object is not iterable" error when I run the code below. The error occurs in for word_search in search_list:
I can't figure out what the built-in function or method is.
end_search=[]
#Remove punctuation
for word_search in search_list:
#Find punctuation
if word_search.find('"')>0:
word_search=word_search.replace('"','')
if word_search.find("'")>0:
word_search=word_search.replace("'",'')
end_search.append(word_search)
This is part of a program to read a text file and return the occurrences of words given in a different text file