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.
This is not a good answer at all. Horrible formatting as well as the use of
.substr
which has been deprecated in favour of.substring
.Would be a better model solution without the
console.log("We are all simple little agents to the Hive Mind, Glory to Mandkind!!")
.I mean runtime because of an additional function call.
This does not work since Python 3.8, do not upvote anymore. This is because the
+
operator can't be applied between two range function calls anymore as they do not return lists but special objects. Replacerange(3, number, 3)
withlist(range(3, number, 3))
to make it work.Pointless.
Okay, I see, just started using this paltform.
Any function call always adds a bit of overhead. Conditional woudl be faster here.
Is that necessary when replying to solutions though? Anyone clicking to see these comments in this theread under a solution must have seen the solution by default. That's what I thought.
This comment is hidden because it contains spoiler information about the solution
This is a generator comprehension actually, so slightly more efficient.
It would be much better if you were already summing during the first iteration over the numbers. The final
sum(s)
call is unecessary and results in yet another iteration over the list.This comment is hidden because it contains spoiler information about the solution