Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Delete line of file
#3
You can read files and write files and append to files. You can replace in files, but it is so limited and error prone that it should not be attempted. You cannot remove something from a file.

Now that you know you cannot delete something from a file, how are you going to solve your problem? As a hint the only file operations you need are open, close, read and write.
Reply


Messages In This Thread
Delete line of file - by dionatandiego11 - Aug-05-2020, 02:27 PM
RE: Delete line of file - by DPaul - Aug-05-2020, 05:36 PM
RE: Delete line of file - by deanhystad - Aug-05-2020, 05:40 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  finding p's in words of a multi-line text file johneven 5 4,561 Jun-24-2019, 03:41 PM
Last Post: ThomasL
  reading text file and writing to an output file precedded by line numbers kannan 7 10,708 Dec-11-2018, 02:19 PM
Last Post: ichabod801
  Command line inputs not printing to Log File ijosefson 1 3,444 Oct-19-2017, 06:41 AM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020