Skip to content

Commit ca40e75

Browse files
committed
2016.12.1 edit lesson 1
1 parent 3fe14df commit ca40e75

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

python_basic/python_basic_lesson_01.ipynb

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@
234234
"cell_type": "markdown",
235235
"metadata": {},
236236
"source": [
237+
"---\n",
238+
"\n",
237239
"### print() 和 input() 用法\n",
238240
"\n",
239241
"print() 用来显示内容,input()用来输入内容,在类似命令行的操作中,这两条语句非常有用。\n",
@@ -323,6 +325,27 @@
323325
"print('The length of %s is %d' % (s,x)) "
324326
]
325327
},
328+
{
329+
"cell_type": "code",
330+
"execution_count": 13,
331+
"metadata": {
332+
"collapsed": false
333+
},
334+
"outputs": [
335+
{
336+
"name": "stdout",
337+
"output_type": "stream",
338+
"text": [
339+
"hello from English\n"
340+
]
341+
}
342+
],
343+
"source": [
344+
"# 更加好,更加 pythonic 的写法\n",
345+
"\n",
346+
"print('{greet} from {language}'.format(greet='hello', language='English'))"
347+
]
348+
},
326349
{
327350
"cell_type": "markdown",
328351
"metadata": {},

0 commit comments

Comments
 (0)