this is the code i wrote.
numbers = [5, 2, 555, 7, 111, 7, 2, 111, 2, 2, 5, 5]
for num in numbers:
if numbers.count(num) > 1:
numbers.remove(num)
print(numbers)
the result was:
[555, 111, 7, 111, 2, 2, 5]
What is wrong with this code?
Thanks in advance.