• Custom User Avatar

    Thank you, Happy you appreciated solving it.

    Good luck for FMC2 (this one is on an entirely different level yet ;) )

  • Custom User Avatar

    You're welcome - glad I could avoid you some (bad kind of) debugging, so you can concentrate on the (good kind of) debugging instead ;)

  • Custom User Avatar

    Hi - I looked through your solution and I'm guessing that the "anticheat" is flagging the use of the word "open" that appears in your #comments - presumably it thinks you are trying to open an external file to read its contents.

    Try submitting a version of your code without any comments and also, in case that doesn't work, try renaming any variables that might eventually share a partially bad name, like for example if you have created variables such as "open_new_list" or "eval_my_result", that the anticheat might misinterpret as being python commands (I didn't find any in your code, so just doing the first step of removing the comments should work I think).

    Finally, I looked at Python solutions and other people are indeed using regex so that is allowed in your code.

  • Custom User Avatar

    Yeah, I'm unable to beat this kata in Python.

  • Custom User Avatar
  • Custom User Avatar

    Ranks can't be changed

  • Custom User Avatar

    imho, this is the very best of this site

  • Custom User Avatar

    Thanks for the comment. It's nice to know that some folks out there are gaining something positive from this experience. 🖖

  • Custom User Avatar

    Duplicate issue.

  • Custom User Avatar
  • Custom User Avatar

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

  • Custom User Avatar
    a = [1, 2, 3]
    scl = [1, 2, 3]
    
    def x(a):
      for i in range(len(a)):
        if a[i] in scl:
          a[i] = f'\\{a[i]}'
          
    print(a) --> [1, 2, 3]
    x(a)
    print(a) --> ['\\1', '\\2', '\\3']
    

    This happens because you are mutating the list in place and the Python version of this kata did not account for this to happen.
    And also, your solution still isn't correct for multiple cases of '\n' in front and after a comment.

    i.e solution('\n^ pears\noranges', ['^']) --> '\noranges' should be '\n\noranges'

  • Custom User Avatar

    It's most probably because You are mutating the input (the markers one). This has been an Issue already and no one has fixed it, yet

  • Custom User Avatar

    The tags in description are generally set automatically, many times they don't match accurately, this is not an kata issue.

  • Custom User Avatar

    Thanks. Now I have a merge conflict. :/

  • Loading more items...