Ad
  • Custom User Avatar

    Gotcha. I got it done. REALLY good edge case!

  • Custom User Avatar

    In 'stressed desserts' should equal 'desserts stressed' the first one is not the input value, it is what your function returned instead of the expected value.

  • Custom User Avatar

    That's weird. ALL of my test cases pass except for that one. When I run it locally, it returns a correctly reversed string.

  • Default User Avatar

    also, just to make sure you read the logs ok: the log appears above the test result.

  • Default User Avatar

    this is a valid test. it has been thoroughly vetted in Python and works correctly.

    test.assert_equals(reverse_words('stressed desserts'), 'desserts stressed')
    
  • Custom User Avatar

    This test is failing for no reason: 'stressed desserts' should equal 'desserts stressed'

    I've tested individually on my own machine running the same version of python, and for some reason this test is failing falsely.

  • Custom User Avatar

    cmp is not necessary to solve this at all. New hint: list index values.