请写出一段Python代码实现删除一个list里面的重复元素

1 >>> l = [1,1,2,3,4,5,4]
2 >>> list(set(l))
3 [1, 2, 3, 4, 5]
4 或者
5 d = {}
6 for x in mylist:
7     d[x] = 1
8 mylist = list(d.keys())
原文地址:https://www.cnblogs.com/wht123/p/14217379.html