Skip to content

Commit 38b0bca

Browse files
WangZhenhuaFirstxiaolai
authored andcommitted
替换了一下这几行的顺序,这样能更清晰地表明s这个字符串被用于下面的三个方法,也更易懂一些
1 parent 94d27c9 commit 38b0bca

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

markdown/Part.1.E.5.strings.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -512,10 +512,11 @@ s.lower().count('mp', 10, 30)
512512
from IPython.core.interactiveshell import InteractiveShell
513513
InteractiveShell.ast_node_interactivity = "all"
514514

515-
# str.find(sub[, start[, end]])
516-
print('Example of str.find():')
517515
s = """Simple is better than complex.
518516
Complex is better than complicated."""
517+
518+
print('Example of str.find():')
519+
# str.find(sub[, start[, end]])
519520
s.lower().find('mpl')
520521
s.lower().find('mpl', 10)
521522
s.lower().find('mpl', 10, 20) # 没有找到就返回 -1

0 commit comments

Comments
 (0)