What am I doing wrong here?


#1

def count(sequence, item):
total = 0
split = sequence.split()
for thing in split:
if thing == item:
total += 1
return count


#2

`split() creates a sequence from a singular object, not an iterable.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.