Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
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
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.
This comment is hidden because it contains spoiler information about the solution
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?
.