I might do it like this:
with open('soil_temp.txt', 'r') as f:
read_data = f.readlines()[1:]
id_and_temp = [(i, t)
for i, _, _, t in (line.strip().split(", ") for line in read_data)
if int(t) > 10
]
print("ID, soil_temp")
for i, t in id_and_temp:
print(f"{i}, {t}")
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…