可以通过以下两种方法删除列表中的重复元素:
my_list = [1, 2, 3, 3, 4, 5, 5, 6]
new_list = list(set(my_list))
print(new_list)
输出结果:[1, 2, 3, 4, 5, 6]
my_list = [1, 2, 3, 3, 4, 5, 5, 6]
new_list = []
[new_list.append(x) for x in my_list if x not in new_list]
print(new_list)
输出结果:[1, 2, 3, 4, 5, 6]