摘要: 1.重复元素判定 以下方法可以检查给定列表是不是存在重复元素,它会使用 set() 函数来移除所有重复元素。 def all_unique(lst): return len(lst) == len(set(lst)) x = [1,1,2,2,3,2,3,4,5,6] y = [1,2,3,4,5] 阅读全文
posted @ 2020-12-01 17:15 Tester_Jhm 阅读(360) 评论(0) 推荐(0)