##########################################按行读取txt########################################
file_input=open('path/to/file.txt')
file_list=[]
for line in file_input:
content=line.strip()
file_list.append(content)
del content
file_input.close()
#############################################################################################
------------------------------------------------------------------------------------------------
##########################################python写txt细节########################################
写txt每行加一个'\n',最后一行没有空行的
#################################################################################################
------------------------------------------------------------------------------------------------
##########################################os.system########################################
os.system(cmd)
在终端执行cmd命令
#################################################################################################
转载于:https://www.cnblogs.com/mathfinder/p/6169347.html