Ad
  • Custom User Avatar

    You should usually use a regex (which you might consider more of a stand-alone language than a style) inside a piece of code; here my testing code does that for you :)

  • Custom User Avatar

    Sorry, I thought this comment was for my another kata, so I answered unadequately. Mea culpa.

    Also, thanks for finding a bug in the wording - it should be "extra spaces handling", not "extra zero handling". For some technical reason I can't edit the Test Cases any more (simply can't type in that window), @jhoffner, could you please make this replacement for me?

    So, @Rohan.ag, the problem is about some extra spaces at the beginning and the end of the input - it is mentioned in the kata description, check it.

    As for knowing the input, it's very simple - just print it. :) But not that console output here on CodeWars is HTML, so remember to wrap everything you print in <pre> tag to not miss anything important like extra spaces. :)

  • Custom User Avatar

    "Extra zero handling" message means your code doesn't take proper care of extra 0's at the beginning and end of message.

    "cannot concatenate 'str' and 'NoneType' objects" message means that somewhere in your code you do a + b, and in some situation a happens to be a string and b happens to be a None.

    What you're probably missing is that your code may work differently on different input data. :)