• Sign Up
    Time to claim your honor
  • Training
  • Practice
    Complete challenging Kata to earn honor and ranks. Re-train to hone technique
  • Freestyle Sparring
    Take turns remixing and refactoring others code through Kumite
  • Community
  • Leaderboards
    Achieve honor and move up the global leaderboards
  • Chat
    Join our Discord server and chat with your fellow code warriors
  • Discussions
    View our Github Discussions board to discuss general Codewars topics
  • About
  • Docs
    Learn about all of the different aspects of Codewars
  • Blog
    Read the latest news from Codewars and the community
  • Log In
  • Sign Up
Stynson Avatar
Name:Unknown
Clan:B212
Member Since:Aug 2015
Last Seen:Nov 2023
Profiles:
Following:11
Followers:12
Allies:10
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations
  • Replies (9)
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • WYJ1999628
    • commented on "Format a string of names like 'Bart, Lisa & Maggie'." python solution
    • 5 years ago

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar
    • JizongL
    • commented on "Format a string of names like 'Bart, Lisa & Maggie'." python solution
    • 7 years ago

    yes, very good point. but it only effects it if the comma is in the last person in the array.

  • Custom User Avatar
    • JizongL
    • commented on "Format a string of names like 'Bart, Lisa & Maggie'." python solution
    • 7 years ago

    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'

  • Custom User Avatar
    • grace-luminous
    • commented on "Format a string of names like 'Bart, Lisa & Maggie'." python solution
    • 7 years ago

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar
    • XXX_10
    • commented on "Format a string of names like 'Bart, Lisa & Maggie'." python solution
    • 8 years ago

    Do you know someone whose name include a comma?)

  • Custom User Avatar
    • bvanyushin
    • commented on "Format a string of names like 'Bart, Lisa & Maggie'." python solution
    • 8 years ago

    only if it is the last name

  • Custom User Avatar
    • synthetic308
    • commented on "Conway's Game of Life" kata
    • 9 years ago

    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.

  • Custom User Avatar
    • nth-erik
    • commented on "Conway's Game of Life" kata
    • 9 years ago

    Similar issue here: 2x2 becomes a 3x3 grid in expectation.
    When I write a workaround for it, the test expects the 2x2 again.

  • Custom User Avatar
    • tauchw
    • commented on "Format a string of names like 'Bart, Lisa & Maggie'." python solution
    • 10 years ago

    But it works with perfectly spherical chickens in vacuum :)

  • © 2025 Codewars
  • About
  • API
  • Blog
  • Privacy
  • Terms
  • Code of Conduct
  • Contact

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...