This is my code:

def count(x,y):
... if y in x:
... return x.count(y)

I also tried to convert x and y to string too
Both function works in the interpreter for all the scenario but not on codecademy...
Can someone let me know ? ( should I use the list build-in function instead ? )
Thanks in advance!

Replace this line with your code.


The exercise is intended for practice so shortcuts are not encouraged. Just as the instructions suggest not using the list function, it implies not using count(), either. Try doing it the longhand way.


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