Why don’t I have to use .count() on the —n---- value?
Because it is a value, not an iterable, so has nothing to count. The purpose here is to determine if the item count is greater than N.
m = lst.count(item)
return m > n
Thank you mtf! That helps a lot it’s those little things I’m trying to understand. I did a bunch of research online too just couldn’t find exactly what I needed.
1 Like