摘要:
>>> test1 = ["aaa","bbb","ccc","aaa","aaa","bbb","ddd","eee"] >>> test2 = [] >>> for i in test1: if i not in test2: test2.append(i) >>> test2 ['aaa', 阅读全文
摘要:
>>> test1 ['aaa', 'bbb', 'ccc'] >>> "aaa" in test1 True >>> "ddd" in test1 False >>> "ccc" in test1 True >>> "ddd" not in test1 True >>> "aaa" not in 阅读全文