Checker is buggy


#1
def removeDuplicates(self, A):
    current = None
    output = 0
    for i in range(len(A)):
        if A[i] != current:
            current = A[i]
            output += 1
    print(output)
    return output

Prints 4 but returns an array!


#2

+1, I am getting right answer when running the same input as custom input, but it fails on submitting.


#3

The output is actually the length till which the judge will check your array. Eg. if your return is 4, the judge will check your array till index=3. So you have rearrange the array accordingly.