python 字符串替換 本地地址轉換爲網絡地址


f = open('MUSICFile.txt','r',encoding='utf8')
w = open('MyError.txt','w',encoding='utf8')
for lines in f.readlines():
    print(lines[2:])
    w.write("http:\\\\192.168.1.2"+lines[2:]);     
    #print(lines,end='')
f.close()
w.close()

在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章