I only need to read the first line of a huge file and change it.
Is there a trick to only change the first line of a file and save it as another file using Python? All my code is done in Python and would help me to keep consistency.
The idea is to not have to read and then write the whole file.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…