wutarnow 当前离线
列兵
@echo off set /p a=<2.txt for /f %%I in (2.txt) do ( set b=%%I ) echo %a%%b%复制代码
TOP
依山居 ( 伸手党去死,私信问问题的去死)当前离线
中尉
f=open("a.txt","r") txt=f.readlines() f.close() l=txt[0].rstrip()+txt[-1] print(l)复制代码
懒虫阿布 当前离线
上等兵
@echo off setlocal enabledelayedexpansion for /f "delims=" %%i in (pjfile.txt) do ( if not defined firstrow (set firstrow=%%i) else (set lastrow=%%i) ) echo !firstrow!!lastrow!复制代码