FLAG commited on
Commit ·
924728a
1
Parent(s): 7218b46
Update ch22_11.py
Browse files- ch22_11.py +1 -1
ch22_11.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
def flower_book(flower):
|
| 2 |
# 使用讀取模式開啟檔案
|
| 3 |
-
with open('
|
| 4 |
flower_info = f.readlines() # 逐行讀取並形成串列
|
| 5 |
ans = '' # ans用來儲存花名與花語
|
| 6 |
for i in flower_info: # 讀取花語串列
|
|
|
|
| 1 |
def flower_book(flower):
|
| 2 |
# 使用讀取模式開啟檔案
|
| 3 |
+
with open('flower_book.txt', 'r', encoding='utf-8') as f:
|
| 4 |
flower_info = f.readlines() # 逐行讀取並形成串列
|
| 5 |
ans = '' # ans用來儲存花名與花語
|
| 6 |
for i in flower_info: # 讀取花語串列
|