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 for explanation
If it helps, list comprehension is of the form:
Which can be written as:
You can put as many for as you want, and of course you can put list comprehension inside list comprehension:
Which can be written as:
It took me some time to understand which for was done first when I started.
It's a list comprehension, with an
if
statement (and an index). A very useful structure, even if it's not easy to grasp at first. Read more here: https://docs.python.org/3/tutorial/datastructures.html#list-comprehensionsme too :)
This comment is hidden because it contains spoiler information about the solution
All tests pass, time limit execution fails for the reason "Time: 12303ms Passed: 0 Failed: 0".
The 'Atom' editor shows "Running: python (cwd=undefined pid=733). Exited with code=0 in 0.217 seconds."
Does anybody have the best timing for this kata?
I did not find a way to cut down time at all !!!
Thanks!