list1 = [6, 7, 7, 8, 8, 9]
set(list1)


{6, 7, 8, 9}

 

Python——列表转集合(去重)_spring