标签:pytho div style list pre nbsp move dup span
>>> t = [1, 2, 3, 1, 2, 5, 6, 7, 8] >>> t [1, 2, 3, 1, 2, 5, 6, 7, 8] >>> list(set(t)) [1, 2, 3, 5, 6, 7, 8] >>> s = [1, 2, 3] >>> list(set(t) - set(s)) [8, 5, 6, 7]
python: remove the duplicates in a list
标签:pytho div style list pre nbsp move dup span
原文地址:http://www.cnblogs.com/qingyuanjushi/p/6220846.html