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 think in programing there are a lot of possible solutions and you can evaluate each of them looking at various aspects.
This isn't about who has the "best" solution overall. This is about learning that there is always more than one possible solution.
For me it is essential to always write maintainable code. If you are used to do that in any case, then you will always write maintainable code, especially when it is for production environments.
Thus, I do not agree, that in terms of clean code the shorter version is better as clean code is a lot about maintainable code.
I agree that this is shorter in terms of line-count, but what about readablity and maintainablity? My personal experience is that more explicit code is easier to read and to understand (in terms of code-maintenance).
I'm a bit confused why the syntax changes compared to the first part. Why have you introduced the commas? Also the change of the function's return type causes that all tests from the first part need to be adapted. The resulting message could have been a special 'msg'-register in the returned dictionary.
This comment is hidden because it contains spoiler information about the solution