e198912210 当前离线
列兵
3518228042 当前离线
一级士官
TOP
qazplm 当前离线
上等兵
//&cls&(type a.txt) 2>nul|cscript -nologo -e:jscript "%~f0">"b.txt"&pause&exit WSH.echo(WScript.StdIn.ReadAll().replace(/(班级\d+)\s+([^\s,]*),([^\s,]*),([^\s]*)\s+([^\s,]*),([^\s,]*),([^\s]*)/g, '$1学生为\r\n$2$5\r\n$3$6\r\n$4$7\r\n').match(/.+/g).join('\r\n'))复制代码
ivor 当前离线
上校
with open("a.txt",'r') as file: for i in file: print("%s学生为:" % i.split( )[0], file=open("b.txt","a")) for j in range(3): print("%s %s" % ( i.split( )[1].split(",")[j], i.split( )[2].split(",")[j]), file=open("b.txt","a"))复制代码