pyassistant

Keep Only Unique Elements (Preserve Order)

Given a list of integers, return a new list that contains only the elements that appear exactly once in the original list, preserving their original order. Elements that appear multiple times should be removed entirely. Examples: - Input: [1, 2, 2, 3, 4, 3, 5] -> Output: [1, 4, 5] - Input: [7, 7, 7] -> Output: []

Example:

Input:
([1, 2, 2, 3, 4, 3, 5],)
Output:
[1, 4, 5]

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.