What are the different objects we are comparing in this lesson?

So this is how this challenge was worded: “The function should return True if item appears in the list more than n times. The function should return False otherwise.”

And in the problem/challenge that immediately follows it we’re asked to, " Return either item1 or item2 depending on which item appears more often in lst ."

For me, the wording in the first set of instructions was a little confusing because I felt that I needed to make the assumption that when they referred to “list” they meant “lst,” which I didn’t. So, I kept using, more_than_n.count(item), which is wrong but I guess I was treating more_than_n as a list itself instead of the function that it is.

I don’t know if anyone else made the same mistake or was as easily confused as I was. Just wanted to share. I’m open to any feedback or correction on my mistake

Sorry for this late response. But I wanted to follow up on your confusion to help clarify things.

It’s important to think about the different variables or objects that you are working with:

more_than_n > function
lst > parameter to create a variable that should contain a list
item > parameter to create a variable containing a value that could be in the list (string, number, etc)
n > parameter to create a variable that should contain a number
True or False > Boolean values

You want to run the function and have it perform a count. The .count() method can only be used on a list and needs to take a value item as a parameter.

Anyways hope this helps clarifying the different types of objects we’re working with here.

Thank you for taking the time catower! It is clearer now :slight_smile: