def count_usage(term): low_count = 0 high_count = 0 for i, row in jeopardy.iterrows(): if term in row["clean_question"].split(" "): if row["high_value"] == 1: high_count += 1 else: low_count += 1 return high_count, low_count comparison_terms = list(terms_used)[:5] observed_expected =  for term in comparison_terms: observed_expected.append(count_usage(term))
What I expected to happen:
Create a list
What actually happened:
TypeErrorTraceback (most recent call last) <ipython-input-94-e7941042519b> in <module>() 10 return high_count, low_count 11 ---> 12 comparison_terms = list(terms_used)[:5] 13 observed_expected =  14 for term in comparison_terms: TypeError: 'tuple' object is not callable
I’ve spent LOT of time trying to figure out what’s causing the error. After my efforts were unsuccessful, I went back through my ENTIRE project, copying and pasting in code from the solution page, but I’m still getting the same error.