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.
i got a crude formula and used mathway :P
Are you me?
This one is not bad but most of those list comprehensions are soo bad in practice
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Why don't you make a research rather than asking?
This comment is hidden because it contains spoiler information about the solution
I think in this Kata you don't need to print strings in console. Just return it like a result of a function.
This comment is hidden because it contains spoiler information about the solution
I spent 6 hours to understand that solution. Great answer
This one should be BP.
Remember, you can use \d instead 0-9 and there is fullmatch() function, in this case fullmatch makes code more readeable, bc we have less regex code (which is not for reading, write-only code)
Bc If zero or more characters at the beginning of string match the regular expression pattern, return a corresponding match object. Return None if the string does not match the pattern; note that this is different from a zero-length match. So, u get a RE object or None, but we need a bool type as an answer.
You can read more here: https://docs.python.org/3/library/re.html
No, it doesn't.
Here's a profile of running this problem 10 million times with an if/if/if solution versus an if/elif/else solution:
Even if it did, if you care about nanoseconds you shouldn't be choosing different flow control syntax in Python, you should be choosing a different language.
if elif else statement works faster than if if if
I believe best practice is a combination for shorter lines of code as well as readability. I've seen some solutions here that are extremely short but also extremely unreadable. I mean, it's Python we're doing here not Java or something😅
(This is a joke!!)
Loading more items...