I'm trying to count the number of items from a little list I compiled in NotePad. Here's what the list looks like.
"apple
banana
orange
strawberry
kiwi
berries
plum
orange
orange
kiwi"
So in my program I am trying to count the number of instances of "orange" and "kiwi". So the correct answer should be 3 oranges and 2 kiwis. However my program is telling me 2 oranges and 1 kiwi. Why is that?
Never mind guys! A little bit of playing around led me to this. It works great! :)
I'm gonna leave this up for reference in case any one else runs into a similar problem.