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.
yes. Python's negative indexing would then pick 'Player 1 won!' as it's the second last (-2) item in the array.
No... there's no name for this approach. It's probably only good for paper-rock-scissors. I don't code in any other languages, and I suspect that this solution may be unique to Python (which accepts negative indices).
This comment is hidden because it contains spoiler information about the solution
I agree, but shorter solutions tend to be upvoted in Codewars (especially the one-line list conprehensions). Maybe they should benchmark the solutions? Admitedly, I'm really bad at which Python processes are the most efficient and benchmarking would be more informative.
This is so elegant. Love it! I've learned a couple of things from this submission.