python保存列表、字典數據到本地文件

一、保存列表爲.txt文件 #1/list寫入txt ipTable = ['158.59.194.213', '18.9.14.13', '58.59.14.21'] fileObject = open('sampleList.txt', 'w') for ip in ipTable: fileObject.write(ip) fileObject.write(
相關文章
相關標籤/搜索