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.
Okay I somehow made it pass by adding return [0, 1] as an outer condition. Not sure why my code all of a sudden works now...
What is returning from your two_sum function? The sorted function isn't recognizing de result of two_sum as a iterable object.
I'm getting
Traceback (most recent call last):
File "main.py", line 5, in
Test.assert_equals(sorted(two_sum([2,2,3], 4)), [0,1])
TypeError: 'NoneType' object is not iterable
How is it a NoneType object? It looks like it's an array.
Because that would be too easy I guess? Apparently children know how to determine perfect powers.....
Hahahaha. People did this in one simple line.
I wrote 17 lines and took like an hour to figure out how to do it.