We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3fe14df commit ca40e75Copy full SHA for ca40e75
1 file changed
python_basic/python_basic_lesson_01.ipynb
@@ -234,6 +234,8 @@
234
"cell_type": "markdown",
235
"metadata": {},
236
"source": [
237
+ "---\n",
238
+ "\n",
239
"### print() 和 input() 用法\n",
240
"\n",
241
"print() 用来显示内容,input()用来输入内容,在类似命令行的操作中,这两条语句非常有用。\n",
@@ -323,6 +325,27 @@
323
325
"print('The length of %s is %d' % (s,x)) "
324
326
]
327
},
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
346
+ "print('{greet} from {language}'.format(greet='hello', language='English'))"
347
348
349
{
350
351
0 commit comments