Skip to content

Commit 05906ae

Browse files
committed
Updates chapter1.md
Auto commit by GitBook Editor
1 parent 6904346 commit 05906ae

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

chapter1.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
len\( \) 以一個int物件傳回資料項的長度
1010

11+
\`\`\`python
12+
1113
>>>len\(\(“one”,\)\)
1214

1315
1
@@ -20,6 +22,8 @@ len\( \) 以一個int物件傳回資料項的長度
2022

2123
13
2224

25+
\`\`\`
26+
2327
list型態 有個append\(\)方法,可以將一個物件附加至一個清單
2428

2529
就像這樣:
@@ -145,8 +149,6 @@ else:
145149
print("large")
146150
```
147151

148-
149-
150152
---
151153

152154
for...in陳述句
@@ -166,7 +168,7 @@ Sweden
166168

167169
```py
168170
>>> for letter in "ABCDEFGHIJKLMNOPQRSTUVWXYZ":
169-
171+
170172
if letter in "AEIOU":
171173

172174
print\(letter,"is vowel"\)
@@ -232,7 +234,7 @@ Z is a consonant
232234

233235
函式的建立與呼叫
234236

235-
```
237+
```py
236238
>>> def get_int(msg):
237239
while True:
238240
try:

0 commit comments

Comments
 (0)