Ad
  • Custom User Avatar

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

  • Custom User Avatar
    s='?!!?!!?!!?!!!??!!!??!!!??!!!??!!!??'
    s='?  ?!!?!!?!!!  !!!??!!!??!!!??!!!??'
    s='?  ?  ?!!?!!!  !!!  !!!??!!!??!!!??'
    s='?  ?  ?  ?!!!  !!!  !!!  !!!??!!!??'
    

    Again, from left to right. You took the leftmost !! and paired it up with the rightmost ?? there.

  • Custom User Avatar

    It says from left to right, then you start with the leftmost !, and next to it, there is a ?, so that's the first pair you should remove. At least that's what I understand and makes the solution unique.

  • Custom User Avatar

    This is not what "in a row" means. "In a row" means that there have to be two or more adjacent "FIRE", and in your example the two FIRE are not adjacent.

  • Custom User Avatar

    They both serve a purpose. The text is better for direct eyeballing while the string literals are better for copying for further testing/debugging. If one of them was to be removed it's 1, because it is less exact. But there's no need for that, is there. It's not like it's in the way. What can be done though is to combine them by line breaking string literals in some way such that it can still be copied and evaluated, for example:

    ''.join(
     [ 'Hi, I am some \n'
     , 'text and I need \n'
     , 'to be arranged.'
     ]
    )
    

    .. the real problem here in my opinion is that the input text isn't a string literal

  • Custom User Avatar

    The target_case listed by the tests is currently inaccurate for python. In your example, the test says it's testing for a target_case of camel, but the listed expected value of jklmn_j_l_m_j_k_lijklm suggests that it's actually testing for a target_case of snake. This probably sent you looking in the wrong place for a bug in your code. I would suggest printing the inputs for now so you can correctly debug your solution and hopefully someone will fix the tests soon.

    As for the actual problem in your code, your code is failing tests where the input is camelCase and the target_case is snake.