出现两次以上时删除重复条目

Remove duplicate entries when it occurs more than twice

假设,我下面有一个列表

list = [1,1,1,1,2,3,1,4,4,4,4,3,3]

我想删除出现两次以上的重复项。基本上,我想要这样

[1,1,2,3,4,4,3,3]

我使用下面的代码

i = 0
while i < len(list) -2:
    if list[i] == list[i+2]:
        del list[i+2]
    else:
        i = i+2

此代码给出以下输出

[1, 1, 2, 3, 1, 4, 4, 4, 3, 3]

这里 4 出现了三次,但我想要两次。我如何修改代码或任何其他可以提供所需输出的方法?

i = 2
while i < len(list):
    if list[i] == list[i-1] and list[i] == list[i-2]:
        del list[i]
    else:
        i += 1
print(list)

输出:

[1, 1, 2, 3, 1, 4, 4, 3, 3]