@@ -221,7 +221,7 @@ msgid ""
221221" File\" <stdin>\" , line 1, in <module>\n"
222222"NameError: name 'n' is not defined"
223223msgstr ""
224- ">>> n #try to access an undefined variable \n"
224+ ">>> n #嘗試存取未定義的變數 \n"
225225"Traceback (most recent call last):\n"
226226" File\" <stdin>\" , line 1, in <module>\n"
227227"NameError: name 'n' is not defined"
@@ -319,11 +319,11 @@ msgid ""
319319">>> '1975' # digits and numerals enclosed in quotes are also strings\n"
320320"'1975'"
321321msgstr ""
322- ">>> 'spam eggs' #single quotes \n"
322+ ">>> 'spam eggs' #單引號 \n"
323323"'spam eggs'\n"
324- ">>>\" Paris rabbit got your back :)! Yay!\" #double quotes \n"
324+ ">>>\" Paris rabbit got your back :)! Yay!\" #雙引號 \n"
325325"'Paris rabbit got your back :)! Yay!'\n"
326- ">>> '1975' #digits and numerals enclosed in quotes are also strings \n"
326+ ">>> '1975' #以引號包含的數字和數值也是字串 \n"
327327"'1975'"
328328
329329#: ../../tutorial/introduction.rst:158
@@ -349,7 +349,7 @@ msgid ""
349349msgstr ""
350350">>> 'doesn\\ 't' # use\\ ' to escape the single quote...\n"
351351"\" doesn't\" \n"
352- ">>>\" doesn't\" # ...or use double quotes instead \n"
352+ ">>>\" doesn't\" # ...或改用雙引號 \n"
353353"\" doesn't\" \n"
354354">>> '\" Yes,\" they said.'\n"
355355"'\" Yes,\" they said.'\n"
@@ -378,8 +378,8 @@ msgid ""
378378"First line.\n"
379379"Second line."
380380msgstr ""
381- ">>> s = 'First line.\\ nSecond line.' #\\ nmeans newline \n"
382- ">>> s #without print(), special characters are included in the string \n"
381+ ">>> s = 'First line.\\ nSecond line.' #\\ n表示換行 \n"
382+ ">>> s #沒有 print(),特殊字元會包含在字串中 \n"
383383"'First line.\\ nSecond line.'\n"
384384">>> print(s) # with print(), special characters are interpreted, so\\ n "
385385"produces new line\n"
@@ -403,10 +403,10 @@ msgid ""
403403">>> print(r'C:\\ some\\ name') # note the r before the quote\n"
404404"C:\\ some\\ name"
405405msgstr ""
406- ">>> print('C:\\ some\\ name') #here \\ nmeans newline! \n"
406+ ">>> print('C:\\ some\\ name') #這裡 \\ n表示換行! \n"
407407"C:\\ some\n"
408408"ame\n"
409- ">>> print(r'C:\\ some\\ name') #note the r before the quote \n"
409+ ">>> print(r'C:\\ some\\ name') #注意引號前的 r \n"
410410"C:\\ some\\ name"
411411
412412#: ../../tutorial/introduction.rst:193
@@ -468,7 +468,7 @@ msgid ""
468468">>> 3 * 'un' + 'ium'\n"
469469"'unununium'"
470470msgstr ""
471- ">>> # 3times 'un', followed by 'ium'\n"
471+ ">>> # 3次 'un',接著是 'ium'\n"
472472">>> 3 * 'un' + 'ium'\n"
473473"'unununium'"
474474
@@ -526,7 +526,7 @@ msgid ""
526526"SyntaxError: invalid syntax"
527527msgstr ""
528528">>> prefix = 'Py'\n"
529- ">>> prefix 'thon' #can't concatenate a variable and a string literal \n"
529+ ">>> prefix 'thon' #無法串接變數和字串字面值 \n"
530530" File\" <stdin>\" , line 1\n"
531531" prefix 'thon'\n"
532532" ^^^^^^\n"
@@ -568,9 +568,9 @@ msgid ""
568568"'n'"
569569msgstr ""
570570">>> word = 'Python'\n"
571- ">>> word[0] #character in position 0 \n"
571+ ">>> word[0] #位置 0 的字元 \n"
572572"'P'\n"
573- ">>> word[5] #character in position 5 \n"
573+ ">>> word[5] #位置 5 的字元 \n"
574574"'n'"
575575
576576#: ../../tutorial/introduction.rst:264
@@ -587,9 +587,9 @@ msgid ""
587587">>> word[-6]\n"
588588"'P'"
589589msgstr ""
590- ">>> word[-1] #last character \n"
590+ ">>> word[-1] #最後一個字元 \n"
591591"'n'\n"
592- ">>> word[-2] #second-last character \n"
592+ ">>> word[-2] #倒數第二個字元 \n"
593593"'o'\n"
594594">>> word[-6]\n"
595595"'P'"
@@ -614,9 +614,9 @@ msgid ""
614614">>> word[2:5] # characters from position 2 (included) to 5 (excluded)\n"
615615"'tho'"
616616msgstr ""
617- ">>> word[0:2] #characters from position 0 (included) to 2 (excluded) \n"
617+ ">>> word[0:2] #從位置 0 (包含) 到 2 (不包含) 的字元 \n"
618618"'Py'\n"
619- ">>> word[2:5] #characters from position 2 (included) to 5 (excluded) \n"
619+ ">>> word[2:5] #從位置 2 (包含) 到 5 (不包含) 的字元 \n"
620620"'tho'"
621621
622622#: ../../tutorial/introduction.rst:283
@@ -636,11 +636,11 @@ msgid ""
636636">>> word[-2:] # characters from the second-last (included) to the end\n"
637637"'on'"
638638msgstr ""
639- ">>> word[:2] #character from the beginning to position 2 (excluded) \n"
639+ ">>> word[:2] #從開頭到位置 2 (不包含) 的字元 \n"
640640"'Py'\n"
641- ">>> word[4:] #characters from position 4 (included) to the end \n"
641+ ">>> word[4:] #從位置 4 (包含) 到結尾的字元 \n"
642642"'on'\n"
643- ">>> word[-2:] #characters from the second-last (included) to the end \n"
643+ ">>> word[-2:] #從倒數第二個 (包含) 到結尾的字元 \n"
644644"'on'"
645645
646646#: ../../tutorial/introduction.rst:293
@@ -889,11 +889,11 @@ msgid ""
889889">>> squares[-3:] # slicing returns a new list\n"
890890"[9, 16, 25]"
891891msgstr ""
892- ">>> squares[0] #indexing returns the item \n"
892+ ">>> squares[0] #索引回傳項目 \n"
893893"1\n"
894894">>> squares[-1]\n"
895895"25\n"
896- ">>> squares[-3:] #slicing returns a new list \n"
896+ ">>> squares[-3:] #切片回傳新列表 \n"
897897"[9, 16, 25]"
898898
899899#: ../../tutorial/introduction.rst:407
@@ -925,10 +925,10 @@ msgid ""
925925">>> cubes\n"
926926"[1, 8, 27, 64, 125]"
927927msgstr ""
928- ">>> cubes = [1, 8, 27, 65, 125] #something's wrong here \n"
929- ">>> 4 ** 3 #the cube of 4 is 64, not 65! \n"
928+ ">>> cubes = [1, 8, 27, 65, 125] #這裡有問題 \n"
929+ ">>> 4 ** 3 #4 的立方是 64,不是 65! \n"
930930"64\n"
931- ">>> cubes[3] = 64 #replace the wrong value \n"
931+ ">>> cubes[3] = 64 #替換錯誤的值 \n"
932932">>> cubes\n"
933933"[1, 8, 27, 64, 125]"
934934
@@ -947,8 +947,8 @@ msgid ""
947947">>> cubes\n"
948948"[1, 8, 27, 64, 125, 216, 343]"
949949msgstr ""
950- ">>> cubes.append(216) #add the cube of 6 \n"
951- ">>> cubes.append(7 ** 3) #and the cube of 7 \n"
950+ ">>> cubes.append(216) #加入 6 的立方 \n"
951+ ">>> cubes.append(7 ** 3) #以及 7 的立方 \n"
952952">>> cubes\n"
953953"[1, 8, 27, 64, 125, 216, 343]"
954954