Skip to content

Commit

Permalink
sunsulei told me two mistakes, and edited them
Browse files Browse the repository at this point in the history
  • Loading branch information
qiwsir committed May 19, 2016
1 parent 40353c0 commit 0169abd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions 109.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ Python考虑到有不少人可能有这个习惯,因此就帮助程序员把
>>> b = a.upper()
>>> b
'QIWSIR,PYTHON'
>>> c = b.lower() #将所有的小写字母变成大写字母
>>> c = b.lower() #将所有的字母变成小写字母
>>> c
'qiwsir,python'

Expand All @@ -251,7 +251,7 @@ Python考虑到有不少人可能有这个习惯,因此就帮助程序员把
>>> b
'Qiwsir,python'

>>> a = "qiwsir,github" #这里的问题就是网友白羽毛指出的,非常感谢他。
>>> a = "qiwsir,github"
>>> a.istitle()
False
>>> a = "QIWSIR" #当全是大写的时候,返回False
Expand Down Expand Up @@ -280,7 +280,7 @@ Python考虑到有不少人可能有这个习惯,因此就帮助程序员把
>>> a.lower().islower()
True

顺着白羽毛网友指出的,再探究一下,可以这么做:
再探究一下,可以这么做:

>>> a = "This is a Book"
>>> a.istitle()
Expand Down
2 changes: 1 addition & 1 deletion 113.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
>>> lst
['java', 'python', 'c']

仔细观察,变量的名字`lst`,不是`list`不能用`list`作为变量名字。因为`list`是Python的保留字
仔细观察,变量的名字`lst`,不是`list`最好不要用`list`作为变量名字,因为它是Python中内置的对象类型的名字,如果你非要用它做变量名字,很可能引起后续的麻烦

再仔细观察,这个列表中有两个'python'字符串,当删除后,发现结果只删除了第一个'python'字符串,第二个还在。请仔细看前面的文档说明:**remove the first item ...**

Expand Down

0 comments on commit 0169abd

Please sign in to comment.