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
This comment is hidden because it contains spoiler information about the solution
I had a hard time to understand this so i will try to explain for the poeple, who had a question like me.
results = ['Draw!', 'Player 1 won!', 'Player 2 won!']
the first item in the arrays has index [0], the second has index[0] etc but when its negative its go backwards like
'Player 2 won!' is [-1], 'Player 1 won!' is [-2] and finally 'Draw!' is [-3].
[-0] is same as [0]
string replace to str
yes. Python's negative indexing would then pick 'Player 1 won!' as it's the second last (-2) item in the array.
This comment is hidden because it contains spoiler information about the solution
=
is for assignment,==
is for comparison