Ad
  • Default User Avatar

    I have a new problem

    Test Results:
    lets test it
    should work with empty array (1 Passed, 0 Failed)
    should work with one element (1 Passed, 0 Failed)
    should reduce duplicates (5 Passed, 0 Failed)
    and treat lowercase as different from uppercase (1 Passed, 0 Failed)
    and work with int arrays
    STDERR:
    Traceback:
    in
    in unique_in_order
    TypeError: 'int' object is not iterable

    what is that meaning ?

  • Default User Avatar

    ok i think i know whats wrong.

  • Default User Avatar

    HI
    The instruction says:

    unique_in_order('AAAABBBCCDAABBB') == ['A', 'B', 'C', 'D', 'A', 'B']
    unique_in_order('ABBCcAD') == ['A', 'B', 'C', 'c', 'A', 'D']
    unique_in_order([1,2,2,3,3]) == [1,2,3]

    shall be ok.

    I made a function that gives ['A', 'B', 'C', 'D', 'A', 'B']
    for unique_in_order('AAAABBBCCDAABBB')

    but the test says :
    Test Results:
    ✘ None should equal ['A', 'B', 'C', 'D', 'A', 'B']

    what is the problem of this thing ?