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.
thank you both, I will investigate
It depends on what's called built-in. It's the standard library. Even though there can always be non-standard implementations of any language, relying on the standard library is normal.
As for non-standard libraries on CW: https://github.com/Codewars/codewars.com/wiki/Language-Python
yep, sure: https://docs.python.org/3/library/ : everything that is not labelled "Built-in..." is a module present by default (may depend on the python version/installer for some of them, I guess)
@B4B, sorry 'bout the
flag
... what python modules are present by default on CW? is there a list of such defaults for each language? thanksspoiler flag, guys...
@Ashish8796: they are not "built-ins", but the related module is present by default so they always are at hand, if that's your question.
i tried thats why i asked.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
WTF! SPOILER FLAG!! X/
and for your question, there are more cons than pros to the default argument here, because a user can accidentally mess with your function if it's not documented. Other than that, there is no real difference, I'd say (since there is no tail call optimization in python, afaik).
This comment is hidden because it contains spoiler information about the solution
you can do that all you want, you'll just have a solution that either times out or exhausts all its allocated memory. You'd bet that if something like that could cause troubles, CW would already have been down years ago... x)
Very elegant and terse solution. I am wondering that nothing prevents external users to call persistence(31, 5) which may have unwanted consequences elswhere in the codebase.
In Python 2 this solution isn't good because map returns a
list
, so this version is less memory efficient.means each part, let path will be
/index/index/index.html
you will recieve empty list but only last one should be omitted.UPD: general rule: every situation not covered in problem statement - possible.
Now that's thorough. Thanks.
Loading more items...