马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
x
- list1 = [1,1,1,1,3,12,3,99,88,3,2]
- list1.sort()
- a = list1[-1]
- for i in range(len(list1)-2,-1,-1):
- if list1[i] == a:
- list1.remove(list1[i])
- else:
- a = list1[i]
- print(list1)
复制代码
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作! |