2020
09-28
09-28
python 双循环遍历list 变量判断代码
我就废话不多说了,大家还是直接看代码吧!file1='C:\\Users\\Administrator\\Desktop\\test\\ALL.txt'file2='C:\\Users\\Administrator\\Desktop\\test\\little.txt'ALLlist=[]Demondlist=[]withopen(file1,"r")asf1:text1=f1.read()withopen(file2,"r")asf2:text2=f2.read()ALLlist.extend(text1.split())Demondlist.extend(text2.split())#print(demond)foriinALLlist:forjinDemondli...
继续阅读 >