Skip to content

Commit

Permalink
range 函数 step参数默认值 是 应该是1
Browse files Browse the repository at this point in the history
range 函数 step参数默认值 是 应该是1
  • Loading branch information
BosonAlreadyTaken authored Mar 17, 2019
1 parent 37bcae3 commit 09e31d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Part.1.E.3.controlflow.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"第三个参数可选; `step`,步长,就相当于是“等差数列”当中的“差”,默认值是 `0`。例如,`range(1, 10, 2)` 生成的是这样一个数列 `[1, 3, 5, 7, 9]`。所以,打印 `0 ~ 10` 之间的所有奇数,可以这样写:"
"第三个参数可选; `step`,步长,就相当于是“等差数列”当中的“差”,默认值是 `1`。例如,`range(1, 10, 2)` 生成的是这样一个数列 `[1, 3, 5, 7, 9]`。所以,打印 `0 ~ 10` 之间的所有奇数,可以这样写:"
]
},
{
Expand Down

0 comments on commit 09e31d1

Please sign in to comment.