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 comment is hidden because it contains spoiler information about the solution
Because you need to take n as a parameter instead of using
input()
.C sounds painful.
You're printing/logging the answer instead of returning it.
Return the shorter of the two input parameters, then the longer one, then the shorter one again, concatenated in that order.
It does. Print in Python automatically adds a newline at the end by default. But it also works without a newline, because the author calls .splitlines() on the output anyway.
And it's possible without *args because the author, for whatever reason, always calls the function statically with one argument.
TIL
Now I wonder what the original comment said.
one liners in python aren't always exactly "elegant". but yes
Why?
This comment is hidden because it contains spoiler information about the solution
"XIIX" isn't a valid Roman numeral either way.
Why
constant time with the drawback of absolutely insane memory usage
Loading more items...