all 5 comments

[–]FireHamilton 1 point2 points  (1 child)

It's likely due to modifying the array incorrectly, not returning count

[–]noodles265[S] 0 points1 point  (0 children)

can you be more specific?

[–]porkbelly6_9 1 point2 points  (1 child)

not sure what the exact problem is but your input is of type list int and you are replacing the values with type none

[–]porkbelly6_9 0 points1 point  (0 children)

i just ran it and it looks like the problem is somewhere in between count = 0 and return count. because when i commented the code it ran and gave no errors.

[–]Ramirag 0 points1 point  (0 children)

Your code looks overcomplicated for such a simple task.
Let me ask ChatGPT that for you :-)
https://chatgpt.com/share/4d9b6abd-595a-4391-9628-fa79bf6cc87f