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
yes, very good point. but it only effects it if the comma is in the last person in the array.
the [::-1] mirror list.
eg:
'Bart, Lisa, Maggie, Homer & Marge' to
'egraM ,remoH ,eiggaM ,asiL ,traB'
then the .replace specify only to change one ',' to '&' one time.
'egraM & remoH ,eiggaM ,asiL ,traB'
then the last [::-1] mirror the whole list again.
'Bart, Lisa, Maggie, Homer & Marge'
This comment is hidden because it contains spoiler information about the solution
Do you know someone whose name include a comma?)
only if it is the last name
Are you using python? I had the same issue you are reporting with the python test case is because the test is passing the same array to both the function and the validation since it should be the same. I was actually changing that original array and returning a new one, and it validated the new array againt the one I changed.
Technically, that's a feature of python that the array passed to function is not being copied but being changed globally. But for the cleanliness of the test, it should probably be tested against a different array.
Similar issue here: 2x2 becomes a 3x3 grid in expectation.
When I write a workaround for it, the test expects the 2x2 again.
But it works with perfectly spherical chickens in vacuum :)