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.
This comment is hidden because it contains spoiler information about the solution
This is cool I didn't know you could do that.
SyntaxError: assignment expression cannot be used in a comprehension iterable expression
Yeah but... This is just a simple one-liner. So it's still pretty readable, for me at least
It's not THAT bad at the end of the day 😅
You can avoid this now with the walrus operator
This is like what I did, but in one line.
This comment is hidden because it contains spoiler information about the solution
Why did I not think of this...
same thing as drhrich but you avoid subtracting 1 to len(num)-y by passing 1 to enumerate (enumerate has a parameter "start" to start the enumeration at that number)
Python noob here, I gotta say Python one-liners like list comprehension are starting to look pretty understandable (at this level of complexity, at least...)
But cramming logic that repeats on each 'x' doesn't look good for Big O, for sure.
This comment is hidden because it contains spoiler information about the solution
Please mark your post as having spoiler content next time. Your post was visible in the homepage discourse.
This comment is hidden because it contains spoiler information about the solution
But seriously, what scares me is the number of cheerful comments.
We are in deep trouble.
Loading more items...