python讀取文本文件以特定字符串開頭的行

 好比讀取文本文件中以[src-1]開頭的行。python #encoding:utf-8 import re file_object = open('test.txt','rU', encoding='UTF-8') f = open('out.txt','w', encoding='UTF-8') try: for line in file_object: g = r
相關文章
相關標籤/搜索