From 15b98756f60765dae408760a1620e47d9531295c Mon Sep 17 00:00:00 2001 From: Hui Lan Date: Tue, 30 Jul 2019 13:35:11 +0800 Subject: =?UTF-8?q?LectureNotesOnPython.rst:=20=E6=B7=BB=E5=8A=A0=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=AE=B9=E6=98=93=E5=87=BA=E9=94=99=E7=9A=84=E5=9C=B0?= =?UTF-8?q?=E6=96=B9=E3=80=82=20=E7=94=A8list=E6=9D=A5=E5=81=9A=E5=8F=98?= =?UTF-8?q?=E9=87=8F=E5=90=8D=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LectureNotesOnPython.rst | 2 ++ 1 file changed, 2 insertions(+) (limited to 'LectureNotesOnPython.rst') diff --git a/LectureNotesOnPython.rst b/LectureNotesOnPython.rst index 8065a8e..4f75b07 100644 --- a/LectureNotesOnPython.rst +++ b/LectureNotesOnPython.rst @@ -1108,6 +1108,8 @@ join方法 列表小技巧。 把列表中不同的元素提取出来, 做成另外一个列表。 list(set(lst)) 。 +容易出错的地方。 很多初学者会用list作为列表数据的变量名。 不要这么做。 可以用 lst 或 L 来做变量名。 + **练习** 给定任何一个字符串, 统计其中各个单词出现的频率。 考虑以下几种情况。 -- cgit v1.2.1