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.
Didn't we have to consider that array element could be not a number?
This comment is hidden because it contains spoiler information about the solution
In general, no it's not good practice to put everything on one line. In this case, it's fine. This is a very pythonic solution, this would be just fine as is in almost any codebase (depending on usecase).
is it good practice to put everything in one line? it's elegant, but may get hard to read, once things get complicated.
I had exactly the same solution!
:P
and then of course, there's this
biggest facepalm i ve ever had
Yes - recursions are fascinating, however, be careful with them. Recursions could be double-edged swords...
Consider that each recursion level costs in memory on the stack. So if you have too many levels (self invocation) you would end up with a crash on lack of memory (or slowing down your whole computer as your code exhausts whole of the available memory).
In this specific case it is probably fine - we assume a number with a reasonable number of digits.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Cara, gostei muito da sua solução.
Sinceramente me fez pensar em como eu ainda tenho que melhorar, porque a minha resposta teve algumas linhas a mais, mas isso só serve de incentivo para continuar evoluindo
WoW
Very simple to use ;)
a
Loading more items...