Ad
  • Custom User Avatar

    Check where whitespace is added, you may have one in the end of the string.

  • Default User Avatar

    Had the same problem. I used print instead of return -.-

  • Custom User Avatar

    Printing is not a trivial thing here on CodeWars, as the program output is displayed as HTML, not plain text. In situations like this, I may suggest the following:

    1. If something looks weird, print it yourself, do not trust the test diagnostics.
    2. If you're coding in Python, and want to print something, use repr(), not str(), and do not rely on automatic string conversion.
    3. Wrap everything you print with <pre> tag.
    4. When printing something, add .replace('<', '&lt;'), as < often occurs in Python output when printing object instances and stack traces.