米琪卡哇伊
1subl=[i for i in l if l.count(i)>1]Python 3.5.2 (default, Sep 30 2016, 01:32:24) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linuxType "help", "copyright", "credits" or "license" for more information.>>> l=[2,2,3,4,5,6,7,7,7,7]>>> subl=[i for i in l if l.count(i)>1]>>> subl[2, 2, 7, 7, 7, 7]>>> set(subl){2, 7}