I am trying to create handling for floats. Currently I get the greenlight with this code and I pass, but it doesn't count floats that end in 0. For example the current code returns 2 and I want it to return 5.
I expect all the numbers with a float of .0 to still increase the counter.
def count(sequence, item): found = 0 for i in range(len(sequence)): # loop through the list, item by item if str(sequence[i]) == str(item): #check if i matches item found += 1 # if True, return found plus 1 return found print count([69.0,"69.0",1,69.0, "69", 69, 69.0654326], 69)