mardi 30 juin 2015

Delete a chunk of text from a text file (Python)

I am looking for a solution for a code. I need to delete a section of writing in a file using python, the chunk is 5 lines here's an example.

Numberplate: BN30CWS

Time In: Time In: 11:11:3

Time Out: Time In: 11:11:51

Speed: Your Speed: 48MPH

Was this vechile speeding?: No

(Without the gaps )

So if i enter BN30CWS i want those 5 lines to be deleted from the file (fileDocStandard) Please help. Thank you Mike

Aucun commentaire:

Enregistrer un commentaire