看板
[ Python ]
討論串[問題] 請問一下讀檔的問題
共 8 篇文章
內容預覽:
不好意思~~~模仿你的語言測試了一下. 再請教一些問題. **. import re. result = {}. pattern = re.compile(r'(\w+)'). f = open('text.txt', 'r'). for line in f:. for word in patter
(還有283個字)
內容預覽:
不只9個吧?你少了一個 the. --. #!/usr/bin/python. import re. result = {}. pattern = re.compile(r'(\w+)'). f = open('text.txt', 'r'). for line in f:. for word in
(還有70個字)
內容預覽:
最近在練習讀檔的問題. 假如我有一個檔 "text.txt". 內容是:. on one of the ossuaries -- "Mariamene" -- offers.. that the tomb is That of. 我寫了一個程式. --------. import string. i
(還有427個字)