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.
also, its funny and to flex =)
The version of Python which caused this error is not available anymore.
Don't see why would we...
To practice and improve your skills!
Why would you want a one-liner for this problem, or indeed for any other problem?
Normally to "go to the next one" that's what
while
loop condition if for, but doing it withbreak
keyword is fine too. And yep,break
's only use in python is to break out of loop.i did it without em, you would only need them if you wanted to go to the next one and were stuck in a loop no ?
I agree. Also you could move the dict outside the function, so the dict wouldn't be created every function call.
Yay, code golf. I like how on CodeWars there are always some random code golf solutions too.
hey could you please explain how your recursive function returns number of years? Does it add 1 on each recursion and then adds them up?
Is it even possible for
calendar
module to be unavailable?Imagine you had to choose which solution you prefer to debug. Good luck debugging that 3 liner.
Also, I can write shitty code and rank up as long as solutions I post work.
Lastly, what is the point replying to a 2 year old comment and ranting about how wrong I was as a beginner?
I don't agree, it is indeed a reasonable approach, and the code is perfectly readable as well.
No offence, but if you think what he wrote is unreadable, I wonder how you are 3 kyu.
Ah yes, the new 54421 character line length convention
you can store keys of a dict as integers like so:
Loading more items...