Loading...
Loading...
Loading...
A list of customer ids has repeats because some customers ordered twice. Print each id once, in the order of its first appearance.
Example
Input
5 3 1 3 2 1
Output
3 1 2
The second 3 and second 1 are dropped.
Try the problem first. Open one hint at a time.
Build a new list. Add an id only if it is not already in the new list.
Use not in to test it; the original order is kept because you go through the input in order.
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor