比如 comprehension! Python 3.6.3 (default, Oct 3 2017, 07:47:49) [GCC 6.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> foo=[1,2,3] >>> bar=(item for item in foo if foo.count(item) > 0) >>> foo=[2,4,6] >>> list(bar) [2]