Ad
  • Default User Avatar

    My advice is to break the while statemnt over several lines and add a statement that displays the result of each iteration. The patterns show what happens.

    To answer the question: true until there is nothing left to replace. Then it ends.

  • Default User Avatar

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

  • Default User Avatar

    The while statement will keep on replacing the searched-for text with a null. In other words it will remove all (), even if there are lots of them in the string. The ! indicates in-place. If my memory serves me right, this statement does things like ((())) successfully.