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.
Underscore is just a convention, "k for k,g in groupby(iterable)" also works perfectly.
Your code times out because generating all permutations of long strings beforehand is not the way to solve this kata
Oh my god
It's a method to ignore specific values.
For instance:
a,_,b = (1,2,3)
Then: a=1 and b=3
Another example:
a,*_, b = (1,2,3,4,5,6,7,8)
a = 1 and b = 8
Other function to this is save the last result in "_" variable.
So if you do this:
2+4 -> result= 6
_ -> result= 6 #save the last result in your program.
For separate numbers:
But you can do:
This link helps so much: https://www.datacamp.com/tutorial/role-underscore-python
This comment is hidden because it contains spoiler information about the solution
yea i saw this coming but didnt know what else to write lmao
It absorbs water and electrolytes from food that has remained undigested.
Shit, I thought I had a good solution...
what exactly does the colon do?
Oh my fuck.....
Love this solution! A lot cleaner than the for loop imo
Nice. I learned something new.
This comment is hidden because it contains spoiler information about the solution
Im just gonna kill myself
I love it.
Loading more items...