Ad
  • Custom User Avatar

    The list is always valid indeed; I think the problem you're having MIGHT be to do with the method you're using - if you used (like me) a left and right variable and increased/decreased them if it was bigger or smaller (aka two pointers) like i did then the problem is that you need to sort the list - not every list is sorted. This answer is very speicific but it applys for everything that needs to be sorted

  • Custom User Avatar

    The problem is your code doesn't always return a list. Add return [0, 0] at the end. The tests expect a list.

    The input is fine, your code has a bug.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Trying to solve this in Python 3.10 -
    Whenever I try to do anything including printing the 'numbers' or 'target' I get the traceback error that "'NoneType' object is not iterable", however the instructions state that all inputs should be valid, 'numbers' length will be greater than 2 and that 'target' will always equal the sum of two numbers from 'numbers'. Why would the input be none?

  • Custom User Avatar