From e63b717ae5df36edafd6a58e1ef7b74d37021292 Mon Sep 17 00:00:00 2001 From: zxllxz <316948953@qq.com> Date: Fri, 15 Jul 2016 15:10:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=94=99=E5=88=AB=E5=AD=97?= =?UTF-8?q?=EF=BC=9A=E5=A4=8D=E5=90=88-->=E7=AC=A6=E5=90=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/c01/p16_filter_sequence_elements.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/c01/p16_filter_sequence_elements.rst b/source/c01/p16_filter_sequence_elements.rst index dea8a93b..39388149 100644 --- a/source/c01/p16_filter_sequence_elements.rst +++ b/source/c01/p16_filter_sequence_elements.rst @@ -113,7 +113,7 @@ >>> list(compress(addresses, more5)) ['5800 E 58TH', '4801 N BROADWAY', '1039 W GRANVILLE'] >>> -这里的关键点在于先创建一个 ``Boolean`` 序列,指示哪些元素复合条件。 +这里的关键点在于先创建一个 ``Boolean`` 序列,指示哪些元素符合条件。 然后 ``compress()`` 函数根据这个序列去选择输出对应位置为 ``True`` 的元素。 和 ``filter()`` 函数类似, ``compress()`` 也是返回的一个迭代器。因此,如果你需要得到一个列表,