Skip to content

Commit

Permalink
Merge branch 'selfteaching:master' into master
Browse files Browse the repository at this point in the history
Halfknow authored Jan 11, 2024
2 parents e123fb0 + 38b0bca commit e6b6456
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion 00.cover.ipynb
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
"source": [
"**作者:李笑来**\n",
"\n",
"特别感谢**霍炬**([@virushuo](https://github.com/virushuo))、**洪强宁**([@hongqn](https://github.com/hongqn)) 两位良师诤友在此书写作过程中给予我的巨大帮助!\n",
"特别感谢**霍炬**([@virushuo](https://github.com/huo-ju))、**洪强宁**([@hongqn](https://github.com/hongqn)) 两位良师诤友在此书写作过程中给予我的巨大帮助!\n",
"\n",
"```python\n",
"# pseudo-code of selfteaching in Python\n",
8 changes: 4 additions & 4 deletions Part.3.B.2.classes-2.ipynb
Original file line number Diff line number Diff line change
@@ -197,7 +197,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"我们刚刚创建了一个 Golem Class,如果我们想用它 Inherite 一个新的 Class,比如,`Running_Golem`,一个能跑的机器人,那就像以下的代码那样做 —— 注意 `class Running_Golem` 之后的圆括号:"
"我们刚刚创建了一个 Golem Class,如果我们想用它 Inherit 一个新的 Class,比如,`Running_Golem`,一个能跑的机器人,那就像以下的代码那样做 —— 注意 `class Running_Golem` 之后的圆括号:"
]
},
{
@@ -1146,7 +1146,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
@@ -1160,10 +1160,10 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.3"
"version": "3.9.7"
},
"toc-autonumbering": true
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
5 changes: 3 additions & 2 deletions markdown/Part.1.E.5.strings.md
Original file line number Diff line number Diff line change
@@ -512,10 +512,11 @@ s.lower().count('mp', 10, 30)
from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"

# str.find(sub[, start[, end]])
print('Example of str.find():')
s = """Simple is better than complex.
Complex is better than complicated."""

print('Example of str.find():')
# str.find(sub[, start[, end]])
s.lower().find('mpl')
s.lower().find('mpl', 10)
s.lower().find('mpl', 10, 20) # 没有找到就返回 -1

0 comments on commit e6b6456

Please sign in to comment.