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.
Thank you very much Anter69. I get it now!
It's a generator expression: similar in form to list comprehensions, but not the same. Here, the end result is the same, only faster.
You can read more about it e.g. here
Aren't list comprehensions supposed to have [ ]
I'm new at this.
Thank you,
Josh
Done. Thank you for the feedback.
The return type should be a tuple
Under the language drop-down, add new.
Where's the link to it?
Python translation added. Please accept it :)
done)
Better, but your
actual
andexpected
are swapped: CW Pythontest.assert_equals
takes arguments in the order ofactual, expected
and notexpected, actual
.Also, since this translation is already rejected, you may want to fork this translation and publish the fork so that I may approve that instead, cheers :)
Is it okay now?
Python translation added.
Rejecting this because:
from random import random
and then following this guideactual, expected
but the ones afterwards useexpected, actual
so some of the assertions are bound to generate confusing error messages upon failure. I think the correct order of arguments for Pythontest.assert_equals
isactual, expected
but you will have to check with the CW Python Test Reference to confirm this.