My code is:
class Solution(object): def moveZeroes(self, nums): """ :type nums: List[int] :rtype: void Do not return anything, modify nums in-place instead. """ nums = filter(lambda x: x != 0, nums) + filter(lambda x: x == 0, nums)
My input is [0,1,0,3,12]
My answer [0,1,0,3,12]
Why??, I don't know why don't work the filter function, any ideas??. In a terminal in python this working very well..!, the response is [1,3,12,0,0], so.. what happened here =(.. Thank you so much! =)
PS: Sorry for my English!