• 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
BrianC Avatar
Name:Unknown
Clan:Unknown
Member Since:Dec 2016
Last Seen:Jan 2018
Profiles:
    Following:0
    Followers:0
    Allies:0
    View Profile Badges
    • Stats
    • Kata
    • Collections
    • Kumite
    • Social
    • Discourse
    • Conversations (37)
    • Replies
    • Authored
    • Needs Resolution
    • Custom User Avatar
      • ejini战神
      • resolved a suggestion on "Remove Unnecessary Characters from Items in List" kata
      • 2 years ago

      Approved

    • Custom User Avatar
      • SagePtr
      • commented on "Traffic Count During Peak Hours" kata
      • 2 years ago

      Ruby fix in this kumite (awaiting for approval/rejection)

    • Custom User Avatar
      • hobovsky
      • commented on "Traffic Count During Peak Hours" kata
      • 2 years ago

      Done for Python.

    • Custom User Avatar
      • tobeannouncd
      • commented on "Retrieve array value by index with default" python solution
      • 2 years ago

      Another thing to consider is that the object passed in the items parameter may handle indices differently than a standard list (maybe it doesn't support negative indices, for example). In that case, checking that index is between -len(items) and len(items)-1 might lead to unexpected behavior.

    • Custom User Avatar
      • Infuzibil
      • created an issue for "Remove Unnecessary Characters from Items in List" kata
      • 2 years ago

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

    • Custom User Avatar
      • bouchert
      • commented on "Retrieve array value by index with default" python solution
      • 3 years ago

      The philosophy that dominates in Python is "It is easier to ask for forgiveness than permission". Many things in Python are implemented through exceptions, including every single iterator. They know when they've reached the end of the data because of a StopIteration exception being raised. They are designed to be performant enough that you can use them without too much worry, as long as the exception condition is still considerably less likely than the exception-free path. As always, it's recommended to use timeit to profile code if a section of code is performance-critical to determine what changes make a significant difference, but in general, a tight try and except block improves the reliability and sometimes the readability of code. Optimizations are being made all the time, and now Python 3.11's patch notes even claim that a try block that doesn't raise an exception is now "zero cost".

    • Custom User Avatar
      • oldcoder
      • commented on "Remove Unnecessary Characters from Items in List" kata
      • 4 years ago

      description could be better

    • Custom User Avatar
      • JannikB5825
      • commented on "Remove Unnecessary Characters from Items in List" kata
      • 4 years ago

      Thats legit too hard for a 7 kyu im a 5 kyu and even after i hit up google and stackoverflow i didnt get an answer.

    • Custom User Avatar
      • elevenpix
      • commented on "Remove Unnecessary Characters from Items in List" kata
      • 4 years ago

      I saved so much time by unlocking this solution... I'm currently 6kyu, however this 7kyu kata was a bit hard for me.

    • Custom User Avatar
      • Pinkfloydd8
      • commented on "Retrieve array value by index with default" python solution
      • 4 years ago

      I believe it isn't

    • Custom User Avatar
      • ejini战神
      • created an issue for "Traffic Count During Peak Hours" kata
      • 4 years ago
      • Python new test framework should be used (Refer this & this for more detail)

      • Ruby 3.0 should be enabled (Refer this & this for more detail)

    • Custom User Avatar
      • FArekkusu
      • resolved a suggestion on "Traffic Count During Peak Hours" kata
      • 6 years ago
    • Custom User Avatar
      • RomanBoolean
      • commented on "Remove Unnecessary Characters from Items in List" kata
      • 7 years ago

      I like this kata :)

    • Custom User Avatar
      • anter69
      • created a suggestion for "Traffic Count During Peak Hours" kata
      • 7 years ago

      Ruby translation kumited -- please check and approve

    • Custom User Avatar
      • lkilgoretrout
      • commented on "Remove Unnecessary Characters from Items in List" kata
      • 7 years ago

      I just did this kata and had a similar solution to those posted(though longer and uglier). It only works for 4 digit prices though. When I ran my solution I came across a bunch of prices with 5 or 3 digits, which messed up my whole algorithm . It was not clear to me that there would be prices of varying length (which make the re pattern more complex and this kata way harder)

    • Loading more items...
    • © 2025 Codewars
    • About
    • API
    • Blog
    • Privacy
    • Terms
    • Code of Conduct
    • Contact

    Confirm

    • Cancel
    • Confirm

    Collect: undefined

    Loading collection data...