Ad
  • Default User Avatar

    How could this pass the test while my first try failed?
    This should report an error with empty input of s2,
    when you try scramble('r',''), this code return True while it should be False.

  • Default User Avatar

    Thank you for your kindly reminding and reply. I figured it out eventually and passed the test.

  • Default User Avatar

    I copy the code to my computer and works well:
    My code test:
    solution("apples, pears # and bananas\ngrapes\nbananas !apples",['#','!'])
    'apples, pears\ngrapes\nbananas'

    However, failed in here with the exactly same input arguments, which reported:
    'apples, pears\ngrapes\nbananas !' should be 'apples, pears\ngrapes\nbananas'

    Apparently, there exists an error caused this. Please check!