Ad
  • Default User Avatar

    man there are 11 zeroes in your answer but there should be 10 zeroes and you need to delete false as false is converting into zero

  • Custom User Avatar

    OK gotcha, so it's the other way round. Thanks!

  • Custom User Avatar

    First part of assertion is what your code returned, second part is what it should be. In this case False is just another element of list and your problem boils down to the way you check whether element is 0 and what problems you can encounter in python with that.

  • Custom User Avatar

    there seems to be something wrong with at least one of the test cases:

    ['a', 'b', None, 'c', 'd', 1, 1, 3, [], 1, 9, {}, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

    should equal

    ['a', 'b', None, 'c', 'd', 1, False, 1, 3, [], 1, 9, {}, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

    The resulting array is longer than the input array, and the additional element is a Boolean False: why should it return False kind of in the middle of the array?

  • Custom User Avatar

    I fail to understand this test example: In the input array there are three 0 integers. Why would one of them become a False?