pyassistant

Remove duplicates from a list while preserving order

Given a list of integers, remove all duplicate values while preserving the original order of first occurrences. Return the resulting list.

Example:

Input:
[1, 2, 2, 3, 1]
Output:
[1, 2, 3]

Make sure you return your solution, don't print!

AI

Bot

Trying to solve my challenge? Ask if you must, or press the purple button so I can analyze your code.