python_interview_question icon indicating copy to clipboard operation
python_interview_question copied to clipboard

13.请写出一段python代码实现删除list里面的重复元素?

Open August-Ghost opened this issue 5 years ago • 2 comments

两行代码实现: from functools import reduce reduce(lambda a,u: a if u in a else a+[u], l1, [])

August-Ghost avatar Sep 19 '19 12:09 August-Ghost