0

solution to this challenge?

Implement the function unique_in_order which takes as argument a sequence and returns a list of items without any elements with the same value next to each other and preserving the original order of elements. For example: uniqueInOrder("AAAABBBCCDAABBB") == {'A', 'B', 'C', 'D', 'A', 'B'} uniqueInOrder("ABBCcAD") == {'A', 'B', 'C', 'c', 'A', 'D'} uniqueInOrder([1,2,2,3,3]) == {1,2,3}

4th Dec 2019, 7:46 AM
EricWu2
6 Respostas
+ 9
EricWu2 Please, If you need help, you can post the code you're struggling with!  • https://www.sololearn.com/post/75089/?ref=app
4th Dec 2019, 10:40 AM
Danijel Ivanović
Danijel Ivanović - avatar
+ 2
Have you tried? Can you share the code so I can see what the problem is?
4th Dec 2019, 8:08 AM
Ipang
4th Dec 2019, 11:03 AM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
+ 1
https://code.sololearn.com/wTNfMnyQFnF3/?ref=app my code
4th Dec 2019, 2:30 PM
EricWu2
0
EricWu2 Seems to be working code, is there problem that I missed? I did it much like you do, but I only tested it with the samples from your original question. https://code.sololearn.com/wQUEZhhN7VHG/?ref=app
4th Dec 2019, 2:35 PM
Ipang
0
no problem. I have fixed the code
4th Dec 2019, 2:48 PM
EricWu2