• 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
ProjectGuerilla Avatar
Name:Tom Stratton
Clan:Tom Stratton Consulting
Member Since:Aug 2015
Last Seen:Oct 2015
Profiles:
Following:0
Followers:0
Allies:0
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (9)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • tushar786
    • commented on "Which are in?" python solution
    • 9 years ago

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

  • Custom User Avatar
    • bondor
    • commented on "Valid Phone Number" kata
    • 10 years ago

    Fairly new to regex myself. I wondered the same after reading your comment and found this SE thread very informative.
    http://programmers.stackexchange.com/questions/113237/when-you-should-not-use-regular-expressions

  • Custom User Avatar
    • ProjectGuerilla
    • commented on "Which are in?" python solution
    • 10 years ago

    Never mind - set comprehension! Duh!

  • Custom User Avatar
    • ProjectGuerilla
    • commented on "Which are in?" python solution
    • 10 years ago

    how does this pass the test case where there is a duplicate in the input list? I don't see how this comprehension eliminates repeating elements...

    eg:
    a1 = ['a','a',b']
    a2 = ['ha', 'ba']
    why is the output NOT ['a','a','b']?

  • Custom User Avatar
    • ProjectGuerilla
    • commented on "Valid Phone Number" kata
    • 10 years ago

    I see that almost all the solutions are Regex based. I have heard that regex should be avoided unless there is a very strong reason to use it. Here, the regex is simple and quite easy to get right but I'm wondering why we WOULD or WOULD_NOT choose a regex in the wild

  • Custom User Avatar
    • ProjectGuerilla
    • commented on "Valid Phone Number" kata
    • 10 years ago

    The input may have 0's in unexpected places - try making the ranges 0-9 and see if that is the issue...

  • Custom User Avatar
    • ProjectGuerilla
    • commented on "Recursive reverse string" python solution
    • 10 years ago

    Good point - I had not conisdered the "N times" instruction. That would be very hard to accomplish with a zero lenght string!

  • Custom User Avatar
    • pagein
    • commented on "Recursive reverse string" python solution
    • 10 years ago

    Thank you, this function really doesn't work in this case. However, there is the following statement
    in the task: "reverse function should be executed only N times", so this case is impossibe, but thank you again, I changed my solution.

  • Custom User Avatar
    • ProjectGuerilla
    • commented on "Recursive reverse string" python solution
    • 10 years ago

    I see this failing for a zero length string so this not be one of the test cases. Fix it simply...

    return str if len(str) <= 1 else str[-1]+reverse(str[:-1])

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

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...