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.
'All triangles will be right isoceles.' from the Kata description.
Nice extension to a general scenario though.
I wanted to demonstrate how many different ways this particular task could be solved, I suppose there are still more than what I found...
Also, I learn from playing with code and experimenting in this way. For example, in this case I learned about
ast
andliteral_eval
.o yea i forgot to note that in the desc haha
done
Not sure it's worth importing for that single use.
My gut feel is that it'd make no measureable difference. That said you can never be sure, so you could benchmark it yourself if you like.
Would import string module make the function run slower?
It is just a fun for me, I solved almost every katas with one-liner solutions. Of course, you are right, it is not recommended in production :)
??????
please use spoiler flag when writing comments that may reveal solution since it's visible in discourse ~~