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 whole point here is that it's not a list comprehension.
If it were a list comprehension, then the whole list would be built, and
all
would be called on it afterwards. But it's a generator comprehension, which produces elements lazily, one by one, as they are iterated over.This comment is hidden because it contains spoiler information about the solution
Yeah, I think I can maybe be a little more liberal with my one-liners.
I use them so long as they are easily understandable (like this one)
Nice one liner. Just currious, do people use if statements like this in production? Thanks!
Check this comment thread. Hint: maybe there's another data structure you can try using.
I don't understand, I can only pass all the cases on the attempt if I return a leaderboard with size 501 but I get an out of bounds error with size 500. How do I return a list of size 500 with 500 objects but the indexes have to start at 1?
Also, Im getting this error:
The code that caused this warning is on line 52 of the file main.py. To get rid of this warning, change code that looks like this:
BeautifulSoup(YOUR_MARKUP})
to this:
BeautifulSoup(YOUR_MARKUP, "html.parser")
markup_type=markup_type))
my code looks like this: soup = BeautifulSoup(page.content, "html.parser")
why is that wrong?
Thanks
Would fail some of the comparisons because the test functions build lists that don't end in an empty node, yet some of the inputs are lists that end in an empty node. Those two are not equivalent so I had to traverse the list and change the empty node to None (Python). Let me know if I just missed something and this isn't an issue.
you can save some space by changing the last 4 lines to: return (s == ending);