Light Mode
Dark Mode
A question about "near and nearly" as it were

Hi,

So I'm very new to this, but I feel like I'm generally grasping things as I go, albeit slowly.

However, I don't understand why it is that using str.count() on the full body of text will return counts on partials (e.g. "near" run through the 1st test in this exercise will return a count of '1' due to the existence of "nearly"), but running the same function on the list(str.split()) only seems to count exact matches.

I would be grateful if someone could explain this.

Thanks.

Created: June 9, 2018, 4:20 a.m.
Updated: Dec. 23, 2019, 8:59 p.m.
1
4
User avatar
4amdonuts